mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset fd5d78e32b56 (bug 999618) for browser-chrome failures; CLOSED TREE
This commit is contained in:
parent
551fcae876
commit
9f4da4cd1b
@ -21,6 +21,8 @@ function test() {
|
||||
|
||||
function addTab(aURI, aIndex) {
|
||||
var tab = gBrowser.addTab(aURI);
|
||||
if (aIndex == 0)
|
||||
gBrowser.removeTab(gBrowser.tabs[0]);
|
||||
|
||||
tab.linkedBrowser.addEventListener("load", function (event) {
|
||||
event.currentTarget.removeEventListener("load", arguments.callee, true);
|
||||
@ -30,22 +32,23 @@ function addTab(aURI, aIndex) {
|
||||
}
|
||||
|
||||
function doTabsTest() {
|
||||
is(gBrowser.tabs.length - 1, URIS.length, "Correctly opened all expected tabs");
|
||||
is(gBrowser.tabs.length, URIS.length, "Correctly opened all expected tabs");
|
||||
|
||||
// sample of "close related tabs" feature
|
||||
gBrowser.tabContainer.addEventListener("TabClose", function (event) {
|
||||
event.currentTarget.removeEventListener("TabClose", arguments.callee, true);
|
||||
var closedTab = event.originalTarget;
|
||||
var scheme = closedTab.linkedBrowser.currentURI.scheme;
|
||||
Array.slice(gBrowser.tabs).forEach(function (aTab, aIndex) {
|
||||
if (aIndex != 0 && aTab != closedTab && aTab.linkedBrowser.currentURI.scheme == scheme)
|
||||
Array.slice(gBrowser.tabs).forEach(function (aTab) {
|
||||
if (aTab != closedTab && aTab.linkedBrowser.currentURI.scheme == scheme)
|
||||
gBrowser.removeTab(aTab);
|
||||
});
|
||||
}, true);
|
||||
|
||||
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||
is(gBrowser.tabs.length - 1, 1, "Related tabs are not closed unexpectedly");
|
||||
gBrowser.removeTab(gBrowser.tabs[0]);
|
||||
is(gBrowser.tabs.length, 1, "Related tabs are not closed unexpectedly");
|
||||
|
||||
gBrowser.removeTab(gBrowser.tabs[1]);
|
||||
gBrowser.addTab("about:blank");
|
||||
gBrowser.removeTab(gBrowser.tabs[0]);
|
||||
finish();
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ function press(key, expectedPos) {
|
||||
}
|
||||
|
||||
function test() {
|
||||
var t1 = gBrowser.addTab();
|
||||
var t2 = gBrowser.addTab();
|
||||
gBrowser.addTab();
|
||||
gBrowser.addTab();
|
||||
is(gBrowser.tabs.length, 3, "got three tabs");
|
||||
is(gBrowser.tabs[0], gBrowser.selectedTab, "first tab is selected");
|
||||
|
||||
@ -25,6 +25,6 @@ function test() {
|
||||
press("end", 2);
|
||||
press("home", 0);
|
||||
|
||||
gBrowser.removeTab(t1);
|
||||
gBrowser.removeTab(t2);
|
||||
gBrowser.removeCurrentTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
}
|
||||
|
@ -2,8 +2,6 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
gPrefService.setBoolPref("dom.disable_open_during_load", false);
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab();
|
||||
|
||||
var browser = gBrowser.selectedBrowser;
|
||||
browser.addEventListener("load", function () {
|
||||
browser.removeEventListener("load", arguments.callee, true);
|
||||
@ -53,6 +51,7 @@ function testPopupUI(win) {
|
||||
|
||||
if (!win.closed)
|
||||
win.close();
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
}
|
||||
|
@ -12,9 +12,10 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
var fileName;
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab("http://mochi.test:8888/browser/browser/base/content/test/general/bug564387.html");
|
||||
gBrowser.loadURI("http://mochi.test:8888/browser/browser/base/content/test/general/bug564387.html");
|
||||
|
||||
registerCleanupFunction(function () {
|
||||
gBrowser.addTab();
|
||||
gBrowser.removeCurrentTab();
|
||||
});
|
||||
|
||||
|
@ -80,8 +80,8 @@ var gTestSteps = [
|
||||
|
||||
gBrowser.addTab("about:blank", {skipAnimation: true});
|
||||
while (gBrowser.tabs.length > 1) {
|
||||
info("Removing tab: " + gBrowser.tabs[1].linkedBrowser.currentURI.spec);
|
||||
gBrowser.selectTabAtIndex(1);
|
||||
info("Removing tab: " + gBrowser.tabs[0].linkedBrowser.currentURI.spec);
|
||||
gBrowser.selectTabAtIndex(0);
|
||||
gBrowser.removeCurrentTab();
|
||||
}
|
||||
ensure_opentabs_match_db(nextStep);
|
||||
|
Loading…
Reference in New Issue
Block a user