Bug 1570336 - Add exception to test rather than disabling the feature for all performance tests r=mconley
authorAndrei Oprea <andrei.br92@gmail.com>
Wed, 14 Aug 2019 14:24:54 +0000
changeset 488228 adba66fff09bc3d77f7f9d865b78095888ba626b
parent 488227 708aa306509aaad62407cb40da2e343ebdc73dab
child 488229 9cd8a0091ff2f85659591ddc67c55db127d30430
push id113904
push userncsoregi@mozilla.com
push dateThu, 15 Aug 2019 19:41:00 +0000
treeherdermozilla-inbound@b283a7ef186c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley
bugs1570336
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1570336 - Add exception to test rather than disabling the feature for all performance tests r=mconley Differential Revision: https://phabricator.services.mozilla.com/D40446
browser/base/content/test/performance/browser.ini
browser/base/content/test/performance/browser_tabopen.js
browser/base/content/test/performance/browser_windowopen.js
--- a/browser/base/content/test/performance/browser.ini
+++ b/browser/base/content/test/performance/browser.ini
@@ -2,17 +2,16 @@
 # to avoid overhead when running the browser normally, startupRecorder.js will
 # do almost nothing unless browser.startup.record is true.
 # gfx.canvas.willReadFrequently.enable is just an optimization, but needs to be
 # set during early startup to have an impact as a canvas will be used by
 # startupRecorder.js
 prefs =
   # Skip migration work in BG__migrateUI for browser_startup.js since it isn't
   # representative of common startup.
-  browser.messaging-system.fxatoolbarbadge.enabled=false # Bug 1570336
   browser.migration.version=9999999
   browser.startup.record=true
   gfx.canvas.willReadFrequently.enable=true
   # The form autofill framescript is only used in certain locales if this
   # pref is set to 'detect', which is the default value on non-Nightly.
   extensions.formautofill.available='on'
 support-files =
   head.js
--- a/browser/base/content/test/performance/browser_tabopen.js
+++ b/browser/base/content/test/performance/browser_tabopen.js
@@ -31,16 +31,19 @@ add_task(async function() {
 
   let tabStripRect = gBrowser.tabContainer.arrowScrollbox.getBoundingClientRect();
   let firstTabRect = gBrowser.selectedTab.getBoundingClientRect();
   let firstTabLabelRect = gBrowser.selectedTab.textLabel.getBoundingClientRect();
   let textBoxRect = gURLBar
     .querySelector("moz-input-box")
     .getBoundingClientRect();
   let historyDropmarkerRect = gURLBar.dropmarker.getBoundingClientRect();
+  let fxaAccountsButton = document
+    .getElementById("fxa-toolbar-menu-button")
+    .getBoundingClientRect();
 
   let inRange = (val, min, max) => min <= val && val <= max;
 
   // Add a reflow observer and open a new tab.
   await withPerfObserver(
     async function() {
       let switchDone = BrowserTestUtils.waitForEvent(window, "TabSwitchDone");
       BrowserOpenTab();
@@ -123,16 +126,25 @@ add_task(async function() {
           {
             name: "bug 1547341 - addressbar history dropmarker is shown",
             condition: r =>
               r.x1 >= historyDropmarkerRect.x &&
               r.x2 <= historyDropmarkerRect.right &&
               r.y1 >= historyDropmarkerRect.y &&
               r.y2 <= historyDropmarkerRect.bottom,
           },
+          {
+            name:
+              "FxA accounts button is intentionally badged 10s after startup",
+            condition: r =>
+              r.x1 >= fxaAccountsButton.left &&
+              r.x2 <= fxaAccountsButton.right &&
+              r.y1 >= fxaAccountsButton.top &&
+              r.y2 <= fxaAccountsButton.bottom,
+          },
         ],
       },
     }
   );
 
   let switchDone = BrowserTestUtils.waitForEvent(window, "TabSwitchDone");
   BrowserTestUtils.removeTab(gBrowser.selectedTab);
   await switchDone;
--- a/browser/base/content/test/performance/browser_windowopen.js
+++ b/browser/base/content/test/performance/browser_windowopen.js
@@ -50,16 +50,19 @@ add_task(async function() {
     AppConstants.BROWSER_CHROME_URL,
     "_blank",
     "chrome,all,dialog=no,remote,suppressanimation",
     "about:home"
   );
 
   let alreadyFocused = false;
   let inRange = (val, min, max) => min <= val && val <= max;
+  let fxaAccountsButton = document
+    .getElementById("fxa-toolbar-menu-button")
+    .getBoundingClientRect();
   let expectations = {
     expectedReflows: EXPECTED_REFLOWS,
     frames: {
       filter(rects, frame, previousFrame) {
         // The first screenshot we get in OSX / Windows shows an unfocused browser
         // window for some reason. See bug 1445161.
         if (!alreadyFocused && isLikelyFocusChange(rects)) {
           alreadyFocused = true;
@@ -97,16 +100,24 @@ add_task(async function() {
                 (AppConstants.platform == "linux" && AppConstants.ASAN)) &&
               r.x1 >= inputFieldRect.left &&
               r.x2 <= inputFieldRect.right &&
               r.y1 >= inputFieldRect.top &&
               r.y2 <= inputFieldRect.bottom
             );
           },
         },
+        {
+          name: "FxA accounts button is intentionally badged 10s after startup",
+          condition: r =>
+            r.x1 >= fxaAccountsButton.left &&
+            r.x2 <= fxaAccountsButton.right &&
+            r.y1 >= fxaAccountsButton.top &&
+            r.y2 <= fxaAccountsButton.bottom,
+        },
       ],
     },
   };
 
   await withPerfObserver(
     async function() {
       // Avoid showing the remotecontrol UI.
       await new Promise(resolve => {