New issue
Advanced search Search tips

Issue 741026 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Clean up AdsPageLoadsMetricsObserver histogram tests

Project Member Reported by jkarlin@chromium.org, Jul 11 2017

Issue description

The tests are rather verbose with much redundancy. Make a function that tests all of the histograms. This will be needed once we add more sources of ads.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0110e71ece27ee7d8ddee33190039b8c3d609e9

commit f0110e71ece27ee7d8ddee33190039b8c3d609e9
Author: Josh Karlin <jkarlin@chromium.org>
Date: Wed Jul 12 15:24:13 2017

[AdsPageLoadMetrics] Clean up the histogram tests

The tests were a bit lengthy, and with more tests upcoming it makes sense to
clean them up by making a histogram-checking function.

BUG= 741026 

Change-Id: Ifb7812d95409ba83d8b07682a4906479ded75c1b
Reviewed-on: https://chromium-review.googlesource.com/567270
Reviewed-by: Bryan McQuade <bmcquade@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485957}
[modify] https://crrev.com/f0110e71ece27ee7d8ddee33190039b8c3d609e9/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc

Comment 2 by mark@chromium.org, Jul 12 2017

Reverting due to compile failure at https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder%20%28dbg%29/builds/89456

/b/c/goma_client/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/chrome/test/unit_tests/ads_page_load_metrics_observer_unittest.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_ASH=1 -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"305735-3\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DOS_CHROMEOS -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DGTEST_API_= -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=1 -DGL_GLEXT_PROTOTYPES -DUSE_GLX -DUSE_EGL -DTOOLKIT_VIEWS=1 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DPROTOBUF_USE_DLLS -DBORINGSSL_SHARED_LIBRARY -DSK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS -DSK_HAS_PNG_LIBRARY -DSK_HAS_WEBP_LIBRARY -DSK_HAS_JPEG_LIBRARY -DSKIA_DLL -DGR_GL_IGNORE_ES3_MSAA=0 -DSK_SUPPORT_GPU=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSING_V8_SHARED -DI18N_ADDRESSINPUT_USE_BASICTYPES_OVERRIDE=1 -DI18N_ADDRESS_VALIDATION_DATA_URL=\"https://chromium-i18n.appspot.com/ssl-aggregate-address/\" -DUNIT_TEST -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DWTF_USE_WEBAUDIO_FFMPEG=1 -DWTF_USE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSING_V8_SHARED -DLEVELDB_PLATFORM_CHROMIUM=1 -DI18N_PHONENUMBERS_USE_ICU_REGEXP=1 -DI18N_PHONENUMBERS_USE_ALTERNATE_FORMATS=1 -DI18N_PHONENUMBERS_NO_THREAD_SAFETY=1 -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DWEBRTC_LINUX -DCHROMEOS -DHUNSPELL_STATIC -DHUNSPELL_CHROME_CLIENT -DUSE_HUNSPELL -DRLZ_NETWORK_IMPLEMENTATION_CHROME_NET -I../.. -Igen -I../../build/linux/debian_jessie_amd64-sysroot/usr/include/glib-2.0 -I../../build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/glib-2.0/include -I../../third_party/googletest/src/googletest/include -I../../third_party/libwebp/src -I../../third_party/khronos -I../../gpu -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/protobuf/src -Igen/protoc_out -I../../third_party/protobuf/src -I../../third_party/boringssl/src/include -I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nss -I../../build/linux/debian_jessie_amd64-sysroot/usr/include/nspr -I../../skia/config -I../../skia/ext -I../../third_party/skia/include/c -I../../third_party/skia/include/config -I../../third_party/skia/include/core -I../../third_party/skia/include/effects -I../../third_party/skia/include/encode -I../../third_party/skia/include/images -I../../third_party/skia/include/lazy -I../../third_party/skia/include/pathops -I../../third_party/skia/include/pdf -I../../third_party/skia/include/pipe -I../../third_party/skia/include/ports -I../../third_party/skia/include/utils -I../../third_party/skia/third_party/vulkan -I../../third_party/skia/include/gpu -I../../third_party/skia/src/gpu -I../../third_party/skia/src/sksl -Igen/components/metrics/proto -I../../third_party/mesa/src/include -I../../third_party/libwebm/source -Igen -I../../third_party/WebKit -Igen/third_party/WebKit -I../../v8/include -Igen/v8/include -I../../third_party/re2/src -Igen -Igen -I../../build/linux/debian_jessie_amd64-sysroot/usr/include/dbus-1.0 -I../../build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I../../third_party/libaddressinput/src/cpp/include -I../../third_party/libaddressinput/chromium/override -I../../third_party/googletest/custom -I../../third_party/googletest/src/googlemock/include -I../../third_party/cacheinvalidation/overrides -I../../third_party/cacheinvalidation/src -I../../third_party/flatbuffers/src/include -I../../third_party/WebKit/Source -I../../third_party/WebKit -Igen/blink -Igen/third_party/WebKit -I../../third_party/libjpeg_turbo -I../../third_party/iccjpeg -I../../third_party/libpng -I../../third_party/zlib -I../../third_party/ots/include -I../../v8/include -Igen/v8/include -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -I../../third_party/libphonenumber/dist/cpp/src -Igen/third_party/libphonenumber -I../../third_party/libxml/src/include -I../../third_party/libxml/linux/include -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/webrtc_overrides -I../../testing/gtest/include -I../../third_party -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fdebug-prefix-map=/b/c/b/linux_chromeos/src=. -m64 -march=x86-64 -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf --sysroot=../../build/linux/debian_jessie_amd64-sysroot -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-auto-raw-pointer -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-header-guard -Wno-exit-time-destructors -Xclang -load -Xclang ../../third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.so -Xclang -add-plugin -Xclang blink-gc-plugin -Xclang -plugin-arg-blink-gc-plugin -Xclang use-chromium-style-naming -DLIBXML_STATIC= -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -c ../../chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc -o obj/chrome/test/unit_tests/ads_page_load_metrics_observer_unittest.o
../../chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc:300:38: error: chosen constructor is explicit in copy-initialization
  TestHistograms(histogram_tester(), {}, 0 /* non_ad_cached_kb */,
                                     ^~
../../build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/debug/vector:79:7: note: explicit constructor declared here
      vector(const _Allocator& __a = _Allocator())
      ^
../../chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc:124:60: note: passing argument to parameter 'google_ad_frames' here
                    const std::vector<ExpectedFrameBytes>& google_ad_frames,
                                                           ^
1 error generated.

Project Member

Comment 3 by bugdroid1@chromium.org, Jul 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/91470aaf2b75c6ac09c9e3d1471d6e1c41c9957e

commit 91470aaf2b75c6ac09c9e3d1471d6e1c41c9957e
Author: Mark Mentovai <mark@chromium.org>
Date: Wed Jul 12 15:54:12 2017

Revert "[AdsPageLoadMetrics] Clean up the histogram tests"

This reverts commit f0110e71ece27ee7d8ddee33190039b8c3d609e9.

Reason for revert: https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Builder%20%28dbg%29/builds/89456

Original change's description:
> [AdsPageLoadMetrics] Clean up the histogram tests
> 
> The tests were a bit lengthy, and with more tests upcoming it makes sense to
> clean them up by making a histogram-checking function.
> 
> BUG= 741026 
> 
> Change-Id: Ifb7812d95409ba83d8b07682a4906479ded75c1b
> Reviewed-on: https://chromium-review.googlesource.com/567270
> Reviewed-by: Bryan McQuade <bmcquade@chromium.org>
> Commit-Queue: Josh Karlin <jkarlin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#485957}

TBR=jkarlin@chromium.org,bmcquade@chromium.org

Change-Id: Ia090584ac4025584165f7eb32f5b08f95b9d417f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  741026 
Reviewed-on: https://chromium-review.googlesource.com/568438
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485975}
[modify] https://crrev.com/91470aaf2b75c6ac09c9e3d1471d6e1c41c9957e/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4c15b1fe31a8c4cf356a00fe39cae37be183a1ce

commit 4c15b1fe31a8c4cf356a00fe39cae37be183a1ce
Author: Josh Karlin <jkarlin@chromium.org>
Date: Thu Jul 13 13:26:42 2017

[Reland] [AdsPageLoadMetrics] Clean up the histogram tests

Reland of https://chromium-review.googlesource.com/c/567270/:
The tests were a bit lengthy, and with more tests upcoming it makes sense to
clean them up by making a histogram-checking function.

BUG= 741026 

Change-Id: I40588136b0a6d8518d3e4130558e9b1dfd057c10
Reviewed-on: https://chromium-review.googlesource.com/568366
Reviewed-by: Bryan McQuade <bmcquade@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486360}
[modify] https://crrev.com/4c15b1fe31a8c4cf356a00fe39cae37be183a1ce/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer_unittest.cc

Should this be marked Fixed?
Status: Fixed (was: Started)
Thanks for the reminder :)

Sign in to add a comment