Backed out changeset 7c96cab6821a (bug 1394914) for failing bc in browser/base/content/test/performance/browser_windowopen_reflows.js r=backout a=backout on a CLOSED TREE

This commit is contained in:
Margareta Eliza Balazs 2017-12-20 14:50:54 +02:00
parent 060948a574
commit 207afdcf3e
4 changed files with 37 additions and 12 deletions

View File

@ -48,6 +48,13 @@ add_task(async function() {
inRange(r.x1, width * .75, width * .9)
},
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
inRange(r.y1, 40, 80) && // in the toolbar
// near the right end of screen
inRange(r.x1, width - 100, width - 50)
},
{name: "bug 1403648 - urlbar should be focused at first paint",
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
// taking 50% to 75% of the window width

View File

@ -98,6 +98,13 @@ add_task(async function() {
inRange(r.x1, width * .75, width * .9)
},
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
inRange(r.y1, 40, 80) && // in the toolbar
// near the right end of screen
inRange(r.x1, width - 100, width - 50)
},
{name: "bug 1403648 - urlbar should be focused at first paint",
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
// taking 50% to 75% of the window width

View File

@ -45,15 +45,6 @@ if (Services.appinfo.OS == "WINNT" || Services.appinfo.OS == "Darwin") {
],
times: 4, // This number should only ever go down - never up.
},
{
stack: [
"onOverflow@resource:///modules/CustomizableUI.jsm",
"init@resource:///modules/CustomizableUI.jsm",
"observe@resource:///modules/CustomizableUI.jsm",
"_delayedStartup@chrome://browser/content/browser.js",
],
times: 2, // This number should only ever go down - never up.
},
);
}

View File

@ -18,14 +18,33 @@
<constructor><![CDATA[
let scope = {};
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
let CustomizableUI = scope.CustomizableUI;
// Add an early overflow event listener that will mark if the
// toolbar overflowed during construction.
if (CustomizableUI.isAreaOverflowable(this.id)) {
if (scope.CustomizableUI.isAreaOverflowable(this.id)) {
this.addEventListener("overflow", this);
this.addEventListener("underflow", this);
}
if (document.readyState == "complete") {
this._init();
} else {
// Need to wait until XUL overlays are loaded. See bug 554279.
let self = this;
document.addEventListener("readystatechange", function onReadyStateChange() {
if (document.readyState != "complete")
return;
document.removeEventListener("readystatechange", onReadyStateChange);
self._init();
});
}
]]></constructor>
<method name="_init">
<body><![CDATA[
let scope = {};
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
let CustomizableUI = scope.CustomizableUI;
// Bug 989289: Forcibly set the now unsupported "mode" and "iconsize"
// attributes, just in case they accidentally get restored from
// persistence from a user that's been upgrading and downgrading.
@ -64,7 +83,8 @@
.filter(node => node.getAttribute("skipintoolbarset") != "true" && node.id)
.map(node => node.id);
CustomizableUI.registerToolbarNode(this, children);
]]></constructor>
]]></body>
</method>
<method name="handleEvent">
<parameter name="aEvent"/>