diff --git a/browser/components/preferences/in-content/tests/browser.ini b/browser/components/preferences/in-content/tests/browser.ini index 97e9a09d6a4c..373f1ecc0162 100644 --- a/browser/components/preferences/in-content/tests/browser.ini +++ b/browser/components/preferences/in-content/tests/browser.ini @@ -9,7 +9,6 @@ support-files = addons/set_newtab.xpi [browser_applications_selection.js] -skip-if = os == 'linux' || verify # bug 1382057 [browser_advanced_update.js] skip-if = !updater [browser_basic_rebuild_fonts_test.js] @@ -36,9 +35,7 @@ skip-if = !updater support-files = browser_bug1184989_prevent_scrolling_when_preferences_flipped.xul [browser_change_app_handler.js] -skip-if = os != "win" || (os == "win" && os_version == "6.1") || (verify && debug) -# This test tests the windows-specific app selection dialog, so can't run on non-Windows. -# Skip the test on Window 7, see the detail at Bug 1381706. +skip-if = os != "win" # Windows-specific handler application selection dialog [browser_checkspelling.js] [browser_connection.js] [browser_connection_bug388287.js] diff --git a/browser/components/preferences/in-content/tests/browser_applications_selection.js b/browser/components/preferences/in-content/tests/browser_applications_selection.js index f10d53690848..353abba2a70f 100644 --- a/browser/components/preferences/in-content/tests/browser_applications_selection.js +++ b/browser/components/preferences/in-content/tests/browser_applications_selection.js @@ -30,10 +30,7 @@ add_task(async function selectInternalOptionForFeed() { container.selectItem(feedItem); Assert.ok(feedItem.selected, "Should be able to select our item."); - // Wait for the menu. - let list = await TestUtils.waitForCondition(() => - win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); - info("Got list after item was selected"); + let list = feedItem.querySelector(".actionsMenu"); // Find the "Add Live bookmarks option". let chooseItems = list.getElementsByAttribute("action", Ci.nsIHandlerInfo.handleInternally); @@ -45,9 +42,6 @@ add_task(async function selectInternalOptionForFeed() { chooseItems[0].dispatchEvent(cmdEvent); // Check that we display the correct result. - list = await TestUtils.waitForCondition(() => - win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); - info("Got list after item was selected"); Assert.ok(list.selectedItem, "Should have a selected item."); Assert.equal(list.selectedItem.getAttribute("action"), Ci.nsIHandlerInfo.handleInternally, @@ -62,17 +56,10 @@ add_task(async function reselectInternalOptionForFeed() { container.selectItem(anotherItem); - // Wait for the menu so that we don't hit race conditions. - await TestUtils.waitForCondition(() => - win.document.getAnonymousElementByAttribute(anotherItem, "class", "actionsMenu")); - info("Got list after item was selected"); - // Now select the feed item again, and check what it is displaying. container.selectItem(feedItem); - let list = await TestUtils.waitForCondition(() => - win.document.getAnonymousElementByAttribute(feedItem, "class", "actionsMenu")); - info("Got list after item was selected"); + let list = feedItem.querySelector(".actionsMenu"); Assert.ok(list.selectedItem, "Should have a selected item"); @@ -118,6 +105,10 @@ add_task(async function sortingCheck() { actionColumn.click(); assertSortByAction("descending"); + // Restore the default sort order + typeColumn.click(); + assertSortByType("ascending"); + function assertSortByAction(order) { Assert.equal(actionColumn.getAttribute("sortDirection"), order, diff --git a/browser/components/preferences/in-content/tests/browser_change_app_handler.js b/browser/components/preferences/in-content/tests/browser_change_app_handler.js index db5cb8f34716..ced29279bc42 100644 --- a/browser/components/preferences/in-content/tests/browser_change_app_handler.js +++ b/browser/components/preferences/in-content/tests/browser_change_app_handler.js @@ -28,8 +28,7 @@ add_task(async function() { container.selectItem(ourItem); ok(ourItem.selected, "Should be able to select our item."); - let list = await TestUtils.waitForCondition(() => win.document.getAnonymousElementByAttribute(ourItem, "class", "actionsMenu")); - info("Got list after item was selected"); + let list = ourItem.querySelector(".actionsMenu"); let chooseItem = list.firstChild.querySelector(".choose-app-item"); let dialogLoadedPromise = promiseLoadSubDialog("chrome://global/content/appPicker.xul"); @@ -51,8 +50,6 @@ add_task(async function() { ok(mimeInfo.preferredApplicationHandler.equals(selectedApp), "App should be set as preferred."); // Check that we display this result: - list = await TestUtils.waitForCondition(() => win.document.getAnonymousElementByAttribute(ourItem, "class", "actionsMenu")); - info("Got list after item was selected"); ok(list.selectedItem, "Should have a selected item"); ok(mimeInfo.preferredApplicationHandler.equals(list.selectedItem.handlerApp), "App should be visible as preferred item."); @@ -84,7 +81,6 @@ add_task(async function() { ok(!mimeInfo.preferredApplicationHandler, "App should no longer be set as preferred."); // Check that we display this result: - list = await TestUtils.waitForCondition(() => win.document.getAnonymousElementByAttribute(ourItem, "class", "actionsMenu")); ok(list.selectedItem, "Should have a selected item"); ok(!list.selectedItem.handlerApp, "No app should be visible as preferred item.");