Backed out changeset 1d6730688107 (bug 947914) for browser-chrome failures

This commit is contained in:
Ed Morley 2014-03-04 17:25:53 +00:00
parent 1e54d4ddf4
commit 7a6003e525
17 changed files with 76 additions and 599 deletions

View File

@ -1,92 +1,76 @@
[DEFAULT]
support-files =
head.js
[browser_873501_handle_specials.js]
[browser_876926_customize_mode_wrapping.js]
[browser_876944_customize_mode_create_destroy.js]
[browser_877006_missing_view.js]
[browser_877178_unregisterArea.js]
[browser_877447_skip_missing_ids.js]
[browser_878452_drag_to_panel.js]
[browser_880164_customization_context_menus.js]
[browser_880382_drag_wide_widgets_in_panel.js]
[browser_884402_customize_from_overflow.js]
skip-if = os == "linux"
[browser_885052_customize_mode_observers_disabed.js]
# Bug 951403 - Disabled on OSX for frequent failures
skip-if = os == "mac"
[browser_885530_showInPrivateBrowsing.js]
[browser_886323_buildArea_removable_nodes.js]
[browser_887438_currentset_shim.js]
[browser_888817_currentset_updating.js]
[browser_889120_customize_tab_merging.js]
[browser_890140_orphaned_placeholders.js]
[browser_890262_destroyWidget_after_add_to_panel.js]
[browser_892955_isWidgetRemovable_for_removed_widgets.js]
[browser_892956_destroyWidget_defaultPlacements.js]
[browser_909779_overflow_toolbars_new_window.js]
skip-if = os == "linux"
[browser_901207_searchbar_in_panel.js]
[browser_913972_currentset_overflow.js]
skip-if = os == "linux"
[browser_914138_widget_API_overflowable_toolbar.js]
skip-if = os == "linux"
[browser_914863_disabled_help_quit_buttons.js]
[browser_918049_skipintoolbarset_dnd.js]
[browser_923857_customize_mode_event_wrapping_during_reset.js]
[browser_927717_customize_drag_empty_toolbar.js]
[browser_932928_show_notice_when_palette_empty.js]
[browser_934113_menubar_removable.js]
# Because this test is about the menubar, it can't be run on mac
skip-if = os == "mac"
[browser_946320_tabs_from_other_computers.js]
skip-if = os == "linux"
[browser_934951_zoom_in_toolbar.js]
[browser_938980_navbar_collapsed.js]
[browser_938995_indefaultstate_nonremovable.js]
[browser_940013_registerToolbarNode_calls_registerArea.js]
[browser_940107_home_button_in_bookmarks_toolbar.js]
[browser_940307_panel_click_closure_handling.js]
[browser_940946_removable_from_navbar_customizemode.js]
[browser_941083_invalidate_wrapper_cache_createWidget.js]
[browser_942581_unregisterArea_keeps_placements.js]
[browser_943683_migration_test.js]
[browser_944887_destroyWidget_should_destroy_in_palette.js]
[browser_945739_showInPrivateBrowsing_customize_mode.js]
[browser_947914_button_addons.js]
[browser_947914_button_copy.js]
[browser_947914_button_cut.js]
[browser_947914_button_devtools.js]
[browser_947914_button_find.js]
[browser_947914_button_fullscreen.js]
[browser_947914_button_history.js]
[browser_947914_button_newPrivateWindow.js]
[browser_947914_button_newWindow.js]
[browser_947914_button_paste.js]
[browser_947914_button_preferences.js]
[browser_947914_button_print.js]
[browser_947914_button_savePage.js]
[browser_947914_button_zoomIn.js]
[browser_947914_button_zoomOut.js]
[browser_947914_button_zoomReset.js]
[browser_947987_removable_default.js]
[browser_948985_non_removable_defaultArea.js]
[browser_952963_areaType_getter_no_area.js]
[browser_956602_remove_special_widget.js]
[browser_968447_bookmarks_toolbar_items_in_panel.js]
[browser_969427_recreate_destroyed_widget_after_reset.js]
[browser_969661_character_encoding_navbar_disabled.js]
[browser_970511_undo_restore_default.js]
[browser_972267_customizationchange_events.js]
[browser_973932_addonbar_currentset.js]
[browser_975719_customtoolbars_behaviour.js]
[browser_978084_dragEnd_after_move.js]
[browser_panel_toggle.js]
[DEFAULT]
support-files =
head.js
[browser_873501_handle_specials.js]
[browser_876926_customize_mode_wrapping.js]
[browser_876944_customize_mode_create_destroy.js]
[browser_877006_missing_view.js]
[browser_877178_unregisterArea.js]
[browser_877447_skip_missing_ids.js]
[browser_878452_drag_to_panel.js]
[browser_880164_customization_context_menus.js]
[browser_880382_drag_wide_widgets_in_panel.js]
[browser_884402_customize_from_overflow.js]
skip-if = os == "linux"
[browser_885052_customize_mode_observers_disabed.js]
# Bug 951403 - Disabled on OSX for frequent failures
skip-if = os == "mac"
[browser_885530_showInPrivateBrowsing.js]
[browser_886323_buildArea_removable_nodes.js]
[browser_887438_currentset_shim.js]
[browser_888817_currentset_updating.js]
[browser_889120_customize_tab_merging.js]
[browser_890140_orphaned_placeholders.js]
[browser_890262_destroyWidget_after_add_to_panel.js]
[browser_892955_isWidgetRemovable_for_removed_widgets.js]
[browser_892956_destroyWidget_defaultPlacements.js]
[browser_909779_overflow_toolbars_new_window.js]
skip-if = os == "linux"
[browser_901207_searchbar_in_panel.js]
[browser_913972_currentset_overflow.js]
skip-if = os == "linux"
[browser_914138_widget_API_overflowable_toolbar.js]
skip-if = os == "linux"
[browser_914863_disabled_help_quit_buttons.js]
[browser_918049_skipintoolbarset_dnd.js]
[browser_923857_customize_mode_event_wrapping_during_reset.js]
[browser_927717_customize_drag_empty_toolbar.js]
[browser_932928_show_notice_when_palette_empty.js]
[browser_934113_menubar_removable.js]
# Because this test is about the menubar, it can't be run on mac
skip-if = os == "mac"
[browser_946320_tabs_from_other_computers.js]
skip-if = os == "linux"
[browser_934951_zoom_in_toolbar.js]
[browser_938980_navbar_collapsed.js]
[browser_938995_indefaultstate_nonremovable.js]
[browser_940013_registerToolbarNode_calls_registerArea.js]
[browser_940107_home_button_in_bookmarks_toolbar.js]
[browser_940307_panel_click_closure_handling.js]
[browser_940946_removable_from_navbar_customizemode.js]
[browser_941083_invalidate_wrapper_cache_createWidget.js]
[browser_942581_unregisterArea_keeps_placements.js]
[browser_943683_migration_test.js]
[browser_944887_destroyWidget_should_destroy_in_palette.js]
[browser_945739_showInPrivateBrowsing_customize_mode.js]
[browser_947987_removable_default.js]
[browser_948985_non_removable_defaultArea.js]
[browser_952963_areaType_getter_no_area.js]
[browser_956602_remove_special_widget.js]
[browser_968447_bookmarks_toolbar_items_in_panel.js]
[browser_969427_recreate_destroyed_widget_after_reset.js]
[browser_969661_character_encoding_navbar_disabled.js]
[browser_970511_undo_restore_default.js]
[browser_972267_customizationchange_events.js]
[browser_973932_addonbar_currentset.js]
[browser_975719_customtoolbars_behaviour.js]
[browser_978084_dragEnd_after_move.js]
[browser_panel_toggle.js]

View File

@ -1,34 +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 addons button existence and functionality");
let initialLocation = gBrowser.currentURI.spec;
yield PanelUI.show();
let addonsButton = document.getElementById("add-ons-button");
ok(addonsButton, "Add-ons button exists in Panel Menu");
addonsButton.click();
yield waitForCondition(function() gBrowser.currentURI &&
gBrowser.currentURI.spec == "about:addons");
let addonsPage = gBrowser.selectedBrowser.contentWindow.document.
getElementById("addons-page");
ok(addonsPage, "Add-ons page was opened");
// close the add-ons tab
if(gBrowser.tabs.length > 1) {
gBrowser.removeTab(gBrowser.selectedTab);
}
else {
var tabToRemove = gBrowser.selectedTab;
gBrowser.addTab(initialLocation);
gBrowser.removeTab(tabToRemove);
}
});

View File

@ -1,54 +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 copy button existence and functionality");
var testText = "copy text test";
let initialLocation = gBrowser.currentURI.spec;
yield PanelUI.show();
let copyButton = document.getElementById("copy-button");
ok(copyButton, "Copy button exists in Panel Menu");
is(copyButton.getAttribute("disabled"), "true", "Copy button is initially disabled");
// copy text from URL bar
gURLBar.value = testText;
gURLBar.focus();
gURLBar.select();
yield PanelUI.show();
ok(!copyButton.hasAttribute("disabled"), "Copy button gets enabled");
copyButton.click();
ok(gURLBar.value == testText, "Selected text is unaltered when clicking copy");
// check that the text was added to the clipboard
let clipboard = Services.clipboard;
let transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
const globalClipboard = clipboard.kGlobalClipboard;
transferable.init(null);
transferable.addDataFlavor("text/unicode");
clipboard.getData(transferable, globalClipboard);
let str = {}, strLength = {};
transferable.getTransferData("text/unicode", str, strLength);
let clipboardValue = "";
if (str.value) {
str.value.QueryInterface(Ci.nsISupportsString);
clipboardValue = str.value.data;
}
is(clipboardValue, testText, "Data was copied to the clipboard.");
// clear the URL value and the clipboard
gURLBar.value = "";
Services.clipboard.emptyClipboard(globalClipboard);
// restore the tab as it was at the begining of the test
var tabToRemove = gBrowser.selectedTab;
gBrowser.addTab(initialLocation);
gBrowser.removeTab(tabToRemove);
});

View File

@ -1,54 +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 cut button existence and functionality");
var testText = "cut text test";
let initialLocation = gBrowser.currentURI.spec;
yield PanelUI.show();
let cutButton = document.getElementById("cut-button");
ok(cutButton, "Cut button exists in Panel Menu");
ok(cutButton.getAttribute("disabled"), "Cut button is disabled");
// cut text from URL bar
gURLBar.value = testText;
gURLBar.focus();
gURLBar.select();
yield PanelUI.show();
ok(!cutButton.hasAttribute("disabled"), "Cut button gets enabled");
cutButton.click();
ok(gURLBar.value == "", "Selected text is removed from source when clicking on cut");
// check that the text was added to the clipboard
let clipboard = Services.clipboard;
let transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
const globalClipboard = clipboard.kGlobalClipboard;
transferable.init(null);
transferable.addDataFlavor("text/unicode");
clipboard.getData(transferable, globalClipboard);
let str = {}, strLength = {};
transferable.getTransferData("text/unicode", str, strLength);
let clipboardValue = "";
if (str.value) {
str.value.QueryInterface(Ci.nsISupportsString);
clipboardValue = str.value.data;
}
is(clipboardValue, testText, "Data was copied to the clipboard.");
// clear the URL value and the clipboard
gURLBar.value = "";
Services.clipboard.emptyClipboard(globalClipboard);
// restore the tab as it was at the begining of the test
var tabToRemove = gBrowser.selectedTab;
gBrowser.addTab(initialLocation);
gBrowser.removeTab(tabToRemove);
});

View File

@ -1,19 +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 developer tools button existence and functionality");
yield PanelUI.show();
let devtoolsButton = document.getElementById("developer-button");
ok(devtoolsButton, "Developer tools button appears in Panel Menu");
devtoolsButton.click();
let devtoolsPanel = document.getElementById("PanelUI-developer");
ok(devtoolsPanel.getAttribute("current"), "Developer tools Panel is in view");
yield PanelUI.hide();
});

View File

@ -1,19 +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 find button existence and functionality");
yield PanelUI.show();
let findButton = document.getElementById("find-button");
ok(findButton, "Find button exists in Panel Menu");
findButton.click();
ok(!gFindBar.hasAttribute("hidden"), "Findbar opened successfully");
// close find bar
gFindBar.close();
});

View File

@ -1,21 +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 fullscreen button existence and functionality");
yield PanelUI.show();
let fullscreenButton = document.getElementById("fullscreen-button");
ok(fullscreenButton, "Fullscreen button appears in Panel Menu");
fullscreenButton.click();
yield waitForCondition(function() window.fullScreen);
ok(window.fullScreen, "Fullscreen mode was opened");
// exit full screen mode
window.fullScreen = !window.fullScreen;
yield waitForCondition(function() !window.fullScreen);
});

View File

@ -1,19 +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 history button existence and functionality");
yield PanelUI.show();
let historyButton = document.getElementById("history-panelmenu");
ok(historyButton, "History button appears in Panel Menu");
historyButton.click();
let historyPanel = document.getElementById("PanelUI-history");
ok(historyPanel.getAttribute("current"), "History Panel is in view");
yield PanelUI.hide();
});

View File

@ -1,45 +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 private browsing button existence and functionality");
yield PanelUI.show();
var windowWasHandled = false;
let privateWindow = null;
let observerWindowOpened = {
observe: function(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
privateWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
privateWindow.addEventListener("load", function newWindowHandler() {
privateWindow.removeEventListener("load", newWindowHandler, false);
is(privateWindow.location.href, "chrome://browser/content/browser.xul",
"A new browser window was opened");
ok(PrivateBrowsingUtils.isWindowPrivate(privateWindow), "Window is private");
windowWasHandled = true;
}, false);
}
}
}
Services.ww.registerNotification(observerWindowOpened);
let privateBrowsingButton = document.getElementById("privatebrowsing-button");
ok(privateBrowsingButton, "Private browsing button exists in Panel Menu");
privateBrowsingButton.click();
try{
yield waitForCondition(() => windowWasHandled);
yield promiseWindowClosed(privateWindow);
}
catch(e) {
ok(false, "The new private browser window was not properly handled");
}
finally {
Services.ww.unregisterNotification(observerWindowOpened);
}
});

View File

@ -1,44 +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 new window button existence and functionality");
yield PanelUI.show();
var windowWasHandled = false;
var newWindow = null;
let observerWindowOpened = {
observe: function(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
newWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
newWindow.addEventListener("load", function newWindowHandler() {
newWindow.removeEventListener("load", newWindowHandler, false);
is(newWindow.location.href, "chrome://browser/content/browser.xul",
"A new browser window was opened");
windowWasHandled = true;
}, false);
}
}
}
Services.ww.registerNotification(observerWindowOpened);
let newWindowButton = document.getElementById("new-window-button");
ok(newWindowButton, "New Window button exists in Panel Menu");
newWindowButton.click();
try{
yield waitForCondition(() => windowWasHandled);
yield promiseWindowClosed(newWindow);
}
catch(e) {
ok(false, "The new browser window was not properly handled");
}
finally {
Services.ww.unregisterNotification(observerWindowOpened);
}
});

View File

@ -1,33 +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 paste button existence and functionality");
let initialLocation = gBrowser.currentURI.spec;
let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].getService(Ci.nsIClipboardHelper);
yield PanelUI.show();
let pasteButton = document.getElementById("paste-button");
ok(pasteButton, "Paste button exists in Panel Menu");
// add text to clipboard
var text = "Sample text for testing";
clipboard.copyString(text);
// test paste button by pasting text to URL bar
gURLBar.focus();
yield PanelUI.show();
ok(!pasteButton.hasAttribute("disabled"), "Paste button is enabled");
pasteButton.click();
is(gURLBar.value, text, "Text pasted successfully");
// restore the tab as it was at the begining of the test
var tabToRemove = gBrowser.selectedTab;
gBrowser.addTab(initialLocation);
gBrowser.removeTab(tabToRemove);
});

View File

@ -1,44 +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 preferences button existence and functionality");
yield PanelUI.show();
var windowWasHandled = false;
let preferencesWindow = null;
let observerWindowOpened = {
observe: function(aSubject, aTopic, aData) {
if (aTopic == "domwindowopened") {
preferencesWindow = aSubject.QueryInterface(Components.interfaces.nsIDOMWindow);
preferencesWindow.addEventListener("load", function newWindowHandler() {
preferencesWindow.removeEventListener("load", newWindowHandler, false);
is(preferencesWindow.location.href, "chrome://browser/content/preferences/preferences.xul",
"A new preferences window was opened");
windowWasHandled = true;
}, false);
}
}
}
Services.ww.registerNotification(observerWindowOpened);
let preferencesButton = document.getElementById("preferences-button");
ok(preferencesButton, "Preferences button exists in Panel Menu");
preferencesButton.click();
try{
yield waitForCondition(() => windowWasHandled);
yield promiseWindowClosed(preferencesWindow);
}
catch(e) {
ok(false, "The preferences window was not properly handled");
}
finally {
Services.ww.unregisterNotification(observerWindowOpened);
}
});

View File

@ -1,28 +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";
const isOSX = (Services.appinfo.OS === "Darwin");
add_task(function() {
info("Check print button existence and functionality");
yield PanelUI.show();
let printButton = document.getElementById("print-button");
ok(printButton, "Print button exists in Panel Menu");
if(isOSX) {
yield PanelUI.hide();
}
else {
printButton.click();
yield waitForCondition(function() window.gInPrintPreviewMode);
ok(window.gInPrintPreviewMode, "Entered print preview mode");
// close print preview
PrintUtils.exitPrintPreview();
yield waitForCondition(() => !window.gInPrintPreviewMode);
}
});

View File

@ -1,15 +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 save page button existence");
yield PanelUI.show();
let savePageButton = document.getElementById("save-page-button");
ok(savePageButton, "Save Page button exists in Panel Menu");
yield PanelUI.hide();
});

View File

@ -1,28 +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 zoom in button existence and functionality");
let initialPageZoom = ZoomManager.zoom;
is(initialPageZoom, 1, "Initial zoom factor should be 1");
yield PanelUI.show();
let zoomInButton = document.getElementById("zoom-in-button");
ok(zoomInButton, "Zoom in button exists in Panel Menu");
zoomInButton.click();
let pageZoomLevel = parseInt(ZoomManager.zoom * 100);
let zoomResetButton = document.getElementById("zoom-reset-button");
let expectedZoomLevel = parseInt(zoomResetButton.getAttribute("label"), 10);
ok(pageZoomLevel > 100 && pageZoomLevel == expectedZoomLevel, "Page zoomed in correctly");
// close the Panel
yield PanelUI.hide();
// reset zoom level
ZoomManager.zoom = initialPageZoom;
});

View File

@ -1,27 +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 zoom out button existence and functionality");
let initialPageZoom = ZoomManager.zoom;
is(initialPageZoom, 1, "Initial zoom factor should be 1");
yield PanelUI.show();
let zoomOutButton = document.getElementById("zoom-out-button");
ok(zoomOutButton, "Zoom out button exists in Panel Menu");
zoomOutButton.click();
let pageZoomLevel = parseInt(ZoomManager.zoom * 100);
let zoomResetButton = document.getElementById("zoom-reset-button");
let expectedZoomLevel = parseInt(zoomResetButton.getAttribute("label"), 10);
ok(pageZoomLevel < 100 && pageZoomLevel == expectedZoomLevel, "Page zoomed out correctly");
// close the panel
yield PanelUI.hide();
// reset zoom level
ZoomManager.zoom = initialPageZoom;
});

View File

@ -1,23 +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 zoom reset button existence and functionality");
ZoomManager.zoom = 0.5;
yield PanelUI.show();
let zoomResetButton = document.getElementById("zoom-reset-button");
ok(zoomResetButton, "Zoom reset button exists in Panel Menu");
zoomResetButton.click();
let pageZoomLevel = parseInt(ZoomManager.zoom * 100);
let expectedZoomLevel = parseInt(zoomResetButton.getAttribute("label"), 10);
ok(pageZoomLevel == expectedZoomLevel && pageZoomLevel == 100, "Page zoom reset correctly");
// close the panel
yield PanelUI.hide();
});