Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5378)

Unified Diff: chrome/browser/chromeos/login/report_custom_flags_unittest.cc

Issue 344883002: Collect UMA statistics on which chrome://flags lead to chrome restart on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bug in about_flags.cc. Sdded comments. s/restarting/custom/ Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/report_custom_flags_unittest.cc
diff --git a/chrome/browser/chromeos/login/report_custom_flags_unittest.cc b/chrome/browser/chromeos/login/report_custom_flags_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..91443e0e8d849cbb079e668fc6487153d1f40c71
--- /dev/null
+++ b/chrome/browser/chromeos/login/report_custom_flags_unittest.cc
@@ -0,0 +1,247 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/login/report_custom_flags.h"
+
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chromeos {
+
+TEST(ReportCustomFlags, FlagsTableValid) {
+ size_t table_size;
+ const char* const* table =
+ GetChromeCustomHistogramSwitchesForTesting(&table_size);
+ EXPECT_EQ(226U, table_size);
+
+ // UMA ID must never be changed.
+ // If flag is removed, dummy value should be inserted instead.
+ EXPECT_STREQ("", table[0]);
+ EXPECT_STREQ("", table[1]);
+ EXPECT_STREQ("", table[2]);
+ EXPECT_STREQ("", table[3]);
+ EXPECT_STREQ("", table[4]);
+ EXPECT_STREQ("overscroll-history-navigation", table[5]);
+ EXPECT_STREQ("enable-service-worker-sync", table[6]);
+ EXPECT_STREQ("no-pings", table[7]);
+ EXPECT_STREQ("no-experiments", table[8]);
+ EXPECT_STREQ("enable-one-copy", table[9]);
+ EXPECT_STREQ("disable-gesture-tap-highlight", table[10]);
+ EXPECT_STREQ("file-manager-enable-new-gallery", table[11]);
+ EXPECT_STREQ("enable-quic-https", table[12]);
+ EXPECT_STREQ("enable-network-portal-notification", table[13]);
+ EXPECT_STREQ("enable-fixed-position-compositing", table[14]);
+ EXPECT_STREQ("enable-virtual-keyboard-overscroll", table[15]);
+ EXPECT_STREQ("allow-insecure-websocket-from-https-origin", table[16]);
+ EXPECT_STREQ("enable-web-based-signin", table[17]);
+ EXPECT_STREQ("show-fps-counter", table[18]);
+ EXPECT_STREQ("enable-offline-auto-reload", table[19]);
+ EXPECT_STREQ("enable-filemanager-mtp", table[20]);
+ EXPECT_STREQ("enable-panels", table[21]);
+ EXPECT_STREQ("enable-scripts-require-action", table[22]);
+ EXPECT_STREQ("enable-smooth-scrolling", table[23]);
+ EXPECT_STREQ("disable-delegated-renderer", table[24]);
+ EXPECT_STREQ("disabled", table[25]);
+ EXPECT_STREQ("malware-interstitial-v2", table[26]);
+ EXPECT_STREQ("disable-touch-editing", table[27]);
+ EXPECT_STREQ("prefetch-search-results", table[28]);
+ EXPECT_STREQ("disable-password-manager-reauthentication", table[29]);
+ EXPECT_STREQ("enable-search-button-in-omnibox-always", table[30]);
+ EXPECT_STREQ("disable-webaudio", table[31]);
+ EXPECT_STREQ("default-tile-height", table[32]);
+ EXPECT_STREQ("enable-session-crashed-bubble", table[33]);
+ EXPECT_STREQ("disable-quickoffice-component-app", table[34]);
+ EXPECT_STREQ("debug-packed-apps", table[35]);
+ EXPECT_STREQ("enable-suggestions-service", table[36]);
+ EXPECT_STREQ("tab-capture-downscale-quality", table[37]);
+ EXPECT_STREQ("manual-enhanced-bookmarks-optout", table[38]);
+ EXPECT_STREQ("disable-accelerated-fixed-root-background", table[39]);
+ EXPECT_STREQ("ash-touch-hud", table[40]);
+ EXPECT_STREQ("disable-device-enumeration", table[41]);
+ EXPECT_STREQ("disable-pinch-virtual-viewport", table[42]);
+ EXPECT_STREQ("enable-deferred-image-decoding", table[43]);
+ EXPECT_STREQ("disable-input-view", table[44]);
+ EXPECT_STREQ("disable-device-discovery-notifications", table[45]);
+ EXPECT_STREQ("enable-password-generation", table[46]);
+ EXPECT_STREQ("manual-enhanced-bookmarks", table[47]);
+ EXPECT_STREQ("extension-content-verification", table[48]);
+ EXPECT_STREQ("enable-ephemeral-apps", table[49]);
+ EXPECT_STREQ("enable-quic", table[50]);
+ EXPECT_STREQ("enable-first-run-ui-transitions", table[51]);
+ EXPECT_STREQ("enable-search-button-in-omnibox-for-str", table[52]);
+ EXPECT_STREQ("enable-distance-field-text", table[53]);
+ EXPECT_STREQ("disable-text-input-focus-manager", table[54]);
+ EXPECT_STREQ("touch-scrolling-mode", table[55]);
+ EXPECT_STREQ("disable-overlay-scrollbar", table[56]);
+ EXPECT_STREQ("max-tiles-for-interest-area", table[57]);
+ EXPECT_STREQ("force-gpu-rasterization", table[58]);
+ EXPECT_STREQ("allow-nacl-socket-api", table[59]);
+ EXPECT_STREQ("enable-request-tablet-site", table[60]);
+ EXPECT_STREQ("enforce_strict", table[61]);
+ EXPECT_STREQ("disable-software-rasterizer", table[62]);
+ EXPECT_STREQ("enable-apps-file-associations", table[63]);
+ EXPECT_STREQ("ssl-interstitial-v2-gray", table[64]);
+ EXPECT_STREQ("show-autofill-type-predictions", table[65]);
+ EXPECT_STREQ("enable-viewport-meta", table[66]);
+ EXPECT_STREQ("silent-debugger-extension-api", table[67]);
+ EXPECT_STREQ("disable-gpu-rasterization", table[68]);
+ EXPECT_STREQ("flag-switches-begin", table[69]);
+ EXPECT_STREQ("disable-offline-load-stale-cache", table[70]);
+ EXPECT_STREQ("enable-virtual-keyboard", table[71]);
+ EXPECT_STREQ("disable-threaded-compositing", table[72]);
+ EXPECT_STREQ("enable-gpu-rasterization", table[73]);
+ EXPECT_STREQ("disable-settings-window", table[74]);
+ EXPECT_STREQ("enable-delegated-renderer", table[75]);
+ EXPECT_STREQ("enable-scroll-prediction", table[76]);
+ EXPECT_STREQ("enable-accelerated-overflow-scroll", table[77]);
+ EXPECT_STREQ("disable-fixed-position-compositing", table[78]);
+ EXPECT_STREQ("disable-webrtc-hw-encoding", table[79]);
+ EXPECT_STREQ("enable-search-button-in-omnibox-for-str-or-iip", table[80]);
+ EXPECT_STREQ("enable-bleeding-edge-rendering-fast-paths", table[81]);
+ EXPECT_STREQ("disable-save-password-bubble", table[82]);
+ EXPECT_STREQ("enable-settings-window", table[83]);
+ EXPECT_STREQ("disable-device-discovery", table[84]);
+ EXPECT_STREQ("disable-zero-copy", table[85]);
+ EXPECT_STREQ("enable-nacl-debug", table[86]);
+ EXPECT_STREQ("enable-save-password-bubble", table[87]);
+ EXPECT_STREQ("disable-prefixed-encrypted-media", table[88]);
+ EXPECT_STREQ("default-tile-width", table[89]);
+ EXPECT_STREQ("disable-embedded-shared-worker", table[90]);
+ EXPECT_STREQ("disable-session-crashed-bubble", table[91]);
+ EXPECT_STREQ("enable-device-discovery-notifications", table[92]);
+ EXPECT_STREQ("enable-carrier-switching", table[93]);
+ EXPECT_STREQ("enable-offline-load-stale-cache", table[94]);
+ EXPECT_STREQ("enable-answers-in-suggest", table[95]);
+ EXPECT_STREQ("enable-app-list", table[96]);
+ EXPECT_STREQ("enable-pinch-virtual-viewport", table[97]);
+ EXPECT_STREQ("disable-offline-auto-reload", table[98]);
+ EXPECT_STREQ("enable-fast-text-autosizing", table[99]);
+ EXPECT_STREQ("enable-print-preview-register-promos", table[100]);
+ EXPECT_STREQ("enable-threaded-compositing", table[101]);
+ EXPECT_STREQ("enable-permissions-bubbles", table[102]);
+ EXPECT_STREQ("enable-easy-unlock", table[103]);
+ EXPECT_STREQ("disable-saml-signin", table[104]);
+ EXPECT_STREQ("do-not-ignore-autocomplete-off", table[105]);
+ EXPECT_STREQ("disable-views-rect-based-targeting", table[106]);
+ EXPECT_STREQ("performance-monitor-gathering", table[107]);
+ EXPECT_STREQ("show-composited-layer-borders", table[108]);
+ EXPECT_STREQ("enable-input-view", table[109]);
+ EXPECT_STREQ("wallet-service-use-sandbox", table[110]);
+ EXPECT_STREQ("policy-switches-begin", table[111]);
+ EXPECT_STREQ("enable-overlay-scrollbar", table[112]);
+ EXPECT_STREQ("enable-account-consistency", table[113]);
+ EXPECT_STREQ("disable-media-source", table[114]);
+ EXPECT_STREQ("enable-service-worker", table[115]);
+ EXPECT_STREQ("enable-touch-editing", table[116]);
+ EXPECT_STREQ("enable-translate-new-ux", table[117]);
+ EXPECT_STREQ("force-device-scale-factor", table[118]);
+ EXPECT_STREQ("ash-debug-shortcuts", table[119]);
+ EXPECT_STREQ("disable-accelerated-2d-canvas", table[120]);
+ EXPECT_STREQ("disable-suggestions-service", table[121]);
+ EXPECT_STREQ("num-raster-threads", table[122]);
+ EXPECT_STREQ("enable-automatic-password-saving", table[123]);
+ EXPECT_STREQ("enable-app-window-controls", table[124]);
+ EXPECT_STREQ("disable-quic", table[125]);
+ EXPECT_STREQ("disable-origin-chip", table[126]);
+ EXPECT_STREQ("malware-interstitial-v3", table[127]);
+ EXPECT_STREQ("touch-events", table[128]);
+ EXPECT_STREQ("enable-experimental-input-view-features", table[129]);
+ EXPECT_STREQ("disable-virtual-keyboard-overscroll", table[130]);
+ EXPECT_STREQ("enable-async-dns", table[131]);
+ EXPECT_STREQ("google-profile-info", table[132]);
+ EXPECT_STREQ("enable-experimental-web-platform-features", table[133]);
+ EXPECT_STREQ("enable-spelling-auto-correct", table[134]);
+ EXPECT_STREQ("enable-web-midi", table[135]);
+ EXPECT_STREQ("enable-nacl", table[136]);
+ EXPECT_STREQ("out-of-process-pdf", table[137]);
+ EXPECT_STREQ("disable-touch-adjustment", table[138]);
+ EXPECT_STREQ("enable-prominent-url-app-flow", table[139]);
+ EXPECT_STREQ("enable-harfbuzz-rendertext", table[140]);
+ EXPECT_STREQ("enable-origin-chip-always", table[141]);
+ EXPECT_STREQ("disable-distance-field-text", table[142]);
+ EXPECT_STREQ("enable-text-input-focus-manager", table[143]);
+ EXPECT_STREQ("fast-user-switching", table[144]);
+ EXPECT_STREQ("enable-encrypted-media", table[145]);
+ EXPECT_STREQ("disable-quic-https", table[146]);
+ EXPECT_STREQ("ssl-interstitial-v1", table[147]);
+ EXPECT_STREQ("enable-spdy4", table[148]);
+ EXPECT_STREQ("disable-permissions-bubbles", table[149]);
+ EXPECT_STREQ("new-avatar-menu", table[150]);
+ EXPECT_STREQ("enable-high-dpi-fixed-position-compositing", table[151]);
+ EXPECT_STREQ("enable-touch-drag-drop", table[152]);
+ EXPECT_STREQ("disable-lcd-text", table[153]);
+ EXPECT_STREQ("enable-transition-compositing", table[154]);
+ EXPECT_STREQ("enable-impl-side-painting", table[155]);
+ EXPECT_STREQ("ignore-gpu-blacklist", table[156]);
+ EXPECT_STREQ("enabled", table[157]);
+ EXPECT_STREQ("enable-download-resumption", table[158]);
+ EXPECT_STREQ("js-flags", table[159]);
+ EXPECT_STREQ("disable-transition-compositing", table[160]);
+ EXPECT_STREQ("sync-touchmove", table[161]);
+ EXPECT_STREQ("enable-experimental-extension-apis", table[162]);
+ EXPECT_STREQ("enable-gesture-tap-highlight", table[163]);
+ EXPECT_STREQ("nacl-debug-mask", table[164]);
+ EXPECT_STREQ("enhanced-bookmarks-experiment", table[165]);
+ EXPECT_STREQ("enable-fast-unload", table[166]);
+ EXPECT_STREQ("disable-boot-animation", table[167]);
+ EXPECT_STREQ("disable-ntp-other-sessions-menu", table[168]);
+ EXPECT_STREQ("enable-origin-chip-on-srp", table[169]);
+ EXPECT_STREQ("disable-account-consistency", table[170]);
+ EXPECT_STREQ("scroll-end-effect", table[171]);
+ EXPECT_STREQ("touchcancel", table[172]);
+ EXPECT_STREQ("disable-pnacl", table[173]);
+ EXPECT_STREQ("ssl-interstitial-v2-colorful", table[174]);
+ EXPECT_STREQ("new-profile-management", table[175]);
+ EXPECT_STREQ("enable-apps-show-on-first-paint", table[176]);
+ EXPECT_STREQ("enable-pinch", table[177]);
+ EXPECT_STREQ("reset-app-list-install-state", table[178]);
+ EXPECT_STREQ("disable-impl-side-painting", table[179]);
+ EXPECT_STREQ("disable-password-generation", table[180]);
+ EXPECT_STREQ("enable-experimental-canvas-features", table[181]);
+ EXPECT_STREQ("enable-offline-auto-reload-visible-only", table[182]);
+ EXPECT_STREQ("enable-streamlined-hosted-apps", table[183]);
+ EXPECT_STREQ("async-touchmove", table[184]);
+ EXPECT_STREQ("disable-touch-drag-drop", table[185]);
+ EXPECT_STREQ("enable-spdy-proxy-dev-auth-origin", table[186]);
+ EXPECT_STREQ("enable-spelling-feedback-field-trial", table[187]);
+ EXPECT_STREQ("tab-capture-upscale-quality", table[188]);
+ EXPECT_STREQ("enable-lcd-text", table[189]);
+ EXPECT_STREQ("enable-swipe-selection", table[190]);
+ EXPECT_STREQ("enable-webgl-draft-extensions", table[191]);
+ EXPECT_STREQ("enable-sync-synced-notifications", table[192]);
+ EXPECT_STREQ("enable-cloud-devices", table[193]);
+ EXPECT_STREQ("bootstrap", table[194]);
+ EXPECT_STREQ("flag-switches-end", table[195]);
+ EXPECT_STREQ("disable-search-button-in-omnibox", table[196]);
+ EXPECT_STREQ("disable-offline-auto-reload-visible-only", table[197]);
+ EXPECT_STREQ("policy-switches-end", table[198]);
+ EXPECT_STREQ("disable-webgl", table[199]);
+ EXPECT_STREQ("enforce", table[200]);
+ EXPECT_STREQ("disable-layer-squashing", table[201]);
+ EXPECT_STREQ("extensions-on-chrome-urls", table[202]);
+ EXPECT_STREQ("disable-network-portal-notification", table[203]);
+ EXPECT_STREQ("ash-enable-touch-view-testing", table[204]);
+ EXPECT_STREQ("enable-touchpad-three-finger-click", table[205]);
+ EXPECT_STREQ("file-manager-enable-new-audio-player", table[206]);
+ EXPECT_STREQ("disable-fast-text-autosizing", table[207]);
+ EXPECT_STREQ("disable-minimize-on-second-launcher-item-click", table[208]);
+ EXPECT_STREQ("disable-webrtc-hw-decoding", table[209]);
+ EXPECT_STREQ("disable-accelerated-video-decode", table[210]);
+ EXPECT_STREQ("save-page-as-mhtml", table[211]);
+ EXPECT_STREQ("disable-new-profile-management", table[212]);
+ EXPECT_STREQ("enable-zero-copy", table[213]);
+ EXPECT_STREQ("enable-linkable-ephemeral-apps", table[214]);
+ EXPECT_STREQ("use-simple-cache-backend", table[215]);
+ EXPECT_STREQ("enable-devtools-experiments", table[216]);
+ EXPECT_STREQ("disable-sync-synced-notifications", table[217]);
+ EXPECT_STREQ("disable-compositor-touch-hit-testing", table[218]);
+ EXPECT_STREQ("enable-accelerated-fixed-root-background", table[219]);
+ EXPECT_STREQ("enable-tcp-fastopen", table[220]);
+ EXPECT_STREQ("disable-async-dns", table[221]);
+ EXPECT_STREQ("enable-syncfs-directory-operation", table[222]);
+ EXPECT_STREQ("disable-spdy-proxy-dev-auth-origin", table[223]);
+ EXPECT_STREQ("disable-display-color-calibration", table[224]);
+ EXPECT_STREQ("disable-accelerated-overflow-scroll", table[225]);
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698