Bug 1222490 - part 3: update all the tests for tabview's removal, r=ttaubert

This commit is contained in:
Gijs Kruitbosch 2015-12-01 10:48:11 +00:00
parent fd796bef77
commit 430a7d49ee
16 changed files with 0 additions and 143 deletions

View File

@ -15,12 +15,6 @@ function testAttrib(elem, attrib, attribValue, msg) {
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
is(gBrowser.tabs.length, 1, "one tab is open initially");
// Add several new tabs in sequence, hiding some, to ensure that the

View File

@ -5,12 +5,6 @@
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
// establish initial state
is(gBrowser.tabs.length, 1, "we start with one tab");

View File

@ -7,12 +7,6 @@
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
// Add a tab that will get removed and hidden
let testTab = gBrowser.addTab("about:blank", {skipAnimation: true});
is(gBrowser.visibleTabs.length, 2, "just added a tab, so 2 tabs");

View File

@ -29,18 +29,6 @@ const EXPECTED_REFLOWS = [
"_handleNewTab@chrome://browser/content/tabbrowser.xml|" +
"onxbltransitionend@chrome://browser/content/tabbrowser.xml|",
// The TabView iframe causes reflows in the parent document.
"iQClass_height@chrome://browser/content/tabview.js|" +
"GroupItem_getContentBounds@chrome://browser/content/tabview.js|" +
"GroupItem_shouldStack@chrome://browser/content/tabview.js|" +
"GroupItem_arrange@chrome://browser/content/tabview.js|" +
"GroupItem_add@chrome://browser/content/tabview.js|" +
"GroupItems_newTab@chrome://browser/content/tabview.js|" +
"TabItem__reconnect@chrome://browser/content/tabview.js|" +
"TabItem@chrome://browser/content/tabview.js|" +
"TabItems_link@chrome://browser/content/tabview.js|" +
"TabItems_init/this._eventListeners.open@chrome://browser/content/tabview.js|",
// SessionStore.getWindowDimensions()
"ssi_getWindowDimension@resource:///modules/sessionstore/SessionStore.jsm|" +
"ssi_updateWindowFeatures/<@resource:///modules/sessionstore/SessionStore.jsm|" +

View File

@ -3,10 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
add_task(function* () {
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
yield new Promise(resolve => TabView._initFrame(resolve));
// There should be one tab when we start the test
let [origTab] = gBrowser.visibleTabs;
@ -31,13 +27,6 @@ add_task(function* () {
gBrowser.selectedTab = testTab;
gBrowser.showOnlyTheseTabs([testTab]);
// if the tabview frame is initialized, we need to move the orignal tab to
// another group; otherwise, selecting a tab would make all three tabs in
// the same group to display.
let tabViewWindow = TabView.getContentWindow();
if (tabViewWindow)
tabViewWindow.GroupItems.moveTabToGroupItem(origTab, null);
visible = gBrowser.visibleTabs;
is(visible.length, 2, "2 tabs should be visible including the pinned");
is(visible[0], pinned, "first is pinned");
@ -101,8 +90,5 @@ add_task(function* () {
is(gBrowser.tabs.length, 1, "sanity check that it matches");
is(gBrowser.selectedTab, origTab, "got the orig tab");
is(origTab.hidden, false, "and it's not hidden -- visible!");
if (tabViewWindow)
tabViewWindow.GroupItems.groupItems[0].close();
});

View File

@ -5,12 +5,6 @@
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
let tabOne = gBrowser.addTab("about:blank");
let tabTwo = gBrowser.addTab("http://mochi.test:8888/");
gBrowser.selectedTab = tabTwo;

View File

@ -5,12 +5,6 @@
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
// There should be one tab when we start the test
let [origTab] = gBrowser.visibleTabs;
is(gBrowser.visibleTabs.length, 1, "1 tab should be open");

View File

@ -3,10 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
add_task(function* test() {
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
yield new Promise(resolve => TabView._initFrame(resolve));
// There should be one tab when we start the test
let [origTab] = gBrowser.visibleTabs;
is(gBrowser.visibleTabs.length, 1, "there is one visible tab");

View File

@ -3,10 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
add_task(function* test() {
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
yield new Promise(resolve => TabView._initFrame(resolve));
gPrefService.setBoolPref("browser.ctrlTab.previews", true);
let [origTab] = gBrowser.visibleTabs;

View File

@ -104,7 +104,6 @@ skip-if = os == "linux" # Intermittent failures
skip-if = e10s # Bug 1088710
[browser_967000_button_feeds.js]
[browser_967000_button_sync.js]
[browser_967000_button_tabView.js]
[browser_968447_bookmarks_toolbar_items_in_panel.js]
skip-if = os == "linux" # Intemittent failures - bug 979207
[browser_968565_insert_before_hidden_items.js]

View File

@ -1,55 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
add_task(function() {
info("Check Tab Groups button functionality");
let deferred = Promise.defer();
let timeout = null;
// add the Tab View button to the panel
CustomizableUI.addWidgetToArea("tabview-button", CustomizableUI.AREA_PANEL);
window.addEventListener("tabviewhidden", function tabViewHidden() {
clearTimeout(timeout);
window.removeEventListener("tabviewhidden", tabViewHidden, false);
ok(true, "Tab View is closed");
deferred.resolve();
}, false);
window.addEventListener("tabviewshown", function tabViewShown() {
window.removeEventListener("tabviewshown", tabViewShown, false);
ok(true, "Tab Groups are loaded");
// close tabs view
window.TabView.hide();
timeout = setTimeout(() => {
window.removeEventListener("tabviewhidden", tabViewHidden, false);
deferred.reject("Tabs view wasn't hidden within 20000ms");
}, 20000);
}, false);
// check the button's functionality
yield PanelUI.show();
let tabViewButton = document.getElementById("tabview-button");
ok(tabViewButton, "Tab Groups button was added to the Panel Menu");
tabViewButton.click();
yield deferred.promise;
ok(!isPanelUIOpen(), "The panel is closed");
if(isPanelUIOpen()) {
let panelHidePromise = promisePanelHidden(window);
PanelUI.hide();
yield panelHidePromise;
}
});
add_task(function asyncCleanup() {
// reset the panel to the default state
yield resetCustomization();
ok(CustomizableUI.inDefaultState, "UI is in default state again.");
});

View File

@ -13,13 +13,6 @@ function observeOneRestore(callback) {
function test() {
waitForExplicitFinish();
// Disable Panorama, since it conflicts with this test.
let tabview = document.getElementById("tab-view");
if (tabview) {
document.getElementById("tab-view").contentWindow.UI.uninit();
TabView.uninit();
}
// There should be one tab when we start the test
let [origTab] = gBrowser.visibleTabs;
let hiddenTab = gBrowser.addTab();
@ -53,11 +46,6 @@ function test() {
gBrowser.removeTab(hiddenTab);
gBrowser.removeTab(extraTab);
// Re-enable Panorama.
if (tabview) {
TabView.init();
}
finish();
});
ss.setBrowserState(JSON.stringify(stateObj));

View File

@ -6,10 +6,6 @@ add_task(function* () {
/** Bug 607016 - If a tab is never restored, attributes (eg. hidden) aren't updated correctly **/
ignoreAllUncaughtExceptions();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
yield new Promise(resolve => TabView._initFrame(resolve));
// Set the pref to true so we know exactly how many tabs should be restoring at
// any given time. This guarantees that a finishing load won't start another.
Services.prefs.setBoolPref("browser.sessionstore.restore_on_demand", true);

View File

@ -7,12 +7,7 @@
function test() {
waitForExplicitFinish();
// Ensure TabView has been initialized already. Otherwise it could
// activate at an unexpected time and show/hide tabs.
TabView._initFrame(runTest);
}
function runTest() {
// We speed up the interval between session saves to ensure that the test
// runs quickly.
Services.prefs.setIntPref("browser.sessionstore.interval", 2000);

View File

@ -10,4 +10,3 @@ support-files =
[browser_ApplicationStorage.js]
[browser_Bookmarks.js]
[browser_Browser.js]
skip-if = e10s # Bug ?????? - uses tabview which doesn't work well in e10s

View File

@ -588,7 +588,6 @@ Tester.prototype = {
CustomizationTabPreloader.uninit();
SocialFlyout.unload();
SocialShare.uninit();
TabView.uninit();
}
// Destroy BackgroundPageThumbs resources.