зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 12ff599ce0e2 (bug 1258344) for leaks in OS X 10.10 debug browser-chrome tests. r=backout on a CLOSED TREE
This commit is contained in:
Родитель
bd2c925bdf
Коммит
8f28197e07
|
@ -210,10 +210,7 @@ CustomizeMode.prototype = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!gTab.selected) {
|
if (!gTab.selected) {
|
||||||
// This will force another .enter() to be called via the
|
|
||||||
// onlocationchange handler of the tabbrowser, so we return early.
|
|
||||||
gTab.ownerGlobal.gBrowser.selectedTab = gTab;
|
gTab.ownerGlobal.gBrowser.selectedTab = gTab;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
gTab.ownerGlobal.focus();
|
gTab.ownerGlobal.focus();
|
||||||
if (gTab.ownerDocument != this.document) {
|
if (gTab.ownerDocument != this.document) {
|
||||||
|
|
|
@ -147,4 +147,3 @@ skip-if = os == "mac"
|
||||||
[browser_bootstrapped_custom_toolbar.js]
|
[browser_bootstrapped_custom_toolbar.js]
|
||||||
[browser_customizemode_contextmenu_menubuttonstate.js]
|
[browser_customizemode_contextmenu_menubuttonstate.js]
|
||||||
[browser_panel_toggle.js]
|
[browser_panel_toggle.js]
|
||||||
[browser_switch_to_customize_mode.js]
|
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
"use strict";
|
|
||||||
|
|
||||||
add_task(function*() {
|
|
||||||
yield startCustomizing();
|
|
||||||
is(gBrowser.tabs.length, 2, "Should have 2 tabs");
|
|
||||||
|
|
||||||
let paletteKidCount = document.getElementById("customization-palette").childElementCount;
|
|
||||||
let nonCustomizingTab = gBrowser.tabContainer.querySelector("tab:not([customizemode=true])");
|
|
||||||
let finishedCustomizing = BrowserTestUtils.waitForEvent(gNavToolbox, "aftercustomization");
|
|
||||||
yield BrowserTestUtils.switchTab(gBrowser, nonCustomizingTab);
|
|
||||||
yield finishedCustomizing;
|
|
||||||
|
|
||||||
let startedCount = 0;
|
|
||||||
let handler = e => startedCount++;
|
|
||||||
gNavToolbox.addEventListener("customizationstarting", handler);
|
|
||||||
yield startCustomizing();
|
|
||||||
CustomizableUI.removeWidgetFromArea("home-button");
|
|
||||||
yield gCustomizeMode.reset().catch(e => {
|
|
||||||
ok(false, "Threw an exception trying to reset after making modifications in customize mode: " + e);
|
|
||||||
});
|
|
||||||
|
|
||||||
let newKidCount = document.getElementById("customization-palette").childElementCount;
|
|
||||||
is(newKidCount, paletteKidCount, "Should have just as many items in the palette as before.");
|
|
||||||
yield endCustomizing();
|
|
||||||
is(startedCount, 1, "Should have only started once");
|
|
||||||
let customizableToolbars = document.querySelectorAll("toolbar[customizable=true]:not([autohide=true])");
|
|
||||||
for (let toolbar of customizableToolbars) {
|
|
||||||
ok(!toolbar.hasAttribute("customizing"), "Toolbar " + toolbar.id + " is no longer customizing");
|
|
||||||
}
|
|
||||||
let menuitem = document.getElementById("PanelUI-customize");
|
|
||||||
isnot(menuitem.getAttribute("label"), menuitem.getAttribute("exitLabel"), "Should have exited successfully");
|
|
||||||
});
|
|
|
@ -191,7 +191,27 @@ function endCustomizing(aWindow=window) {
|
||||||
aWindow.gNavToolbox.addEventListener("aftercustomization", onCustomizationEnds);
|
aWindow.gNavToolbox.addEventListener("aftercustomization", onCustomizationEnds);
|
||||||
aWindow.gCustomizeMode.exit();
|
aWindow.gCustomizeMode.exit();
|
||||||
|
|
||||||
return deferredEndCustomizing.promise;
|
return deferredEndCustomizing.promise.then(function() {
|
||||||
|
let deferredLoadNewTab = Promise.defer();
|
||||||
|
|
||||||
|
//XXXgijs so some tests depend on this tab being about:blank. Make it so.
|
||||||
|
let newTabBrowser = aWindow.gBrowser.selectedBrowser;
|
||||||
|
newTabBrowser.stop();
|
||||||
|
|
||||||
|
// If we stop early enough, this might actually be about:blank.
|
||||||
|
if (newTabBrowser.currentURI.spec == "about:blank") {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Otherwise, make it be about:blank, and wait for that to be done.
|
||||||
|
function onNewTabLoaded(e) {
|
||||||
|
newTabBrowser.removeEventListener("load", onNewTabLoaded, true);
|
||||||
|
deferredLoadNewTab.resolve();
|
||||||
|
}
|
||||||
|
newTabBrowser.addEventListener("load", onNewTabLoaded, true);
|
||||||
|
newTabBrowser.loadURI("about:blank");
|
||||||
|
return deferredLoadNewTab.promise;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function startCustomizing(aWindow=window) {
|
function startCustomizing(aWindow=window) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче