Bug 607821 - intermittent timeout toolkit/mozapps/extensions/test/browser/browser_bug557956.js | Test timed out. r=dtownsend, a=b7

This commit is contained in:
Robert Strong 2010-10-29 12:05:26 -07:00
Родитель 0f4c2cf5f1
Коммит 4ffe4f7e94
7 изменённых файлов: 23 добавлений и 4 удалений

Просмотреть файл

@ -51,7 +51,7 @@
<wizard id="updateWizard"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&updateWizard.title;"
windowtype="Update:Wizard"
windowtype="Addons:Compatibility"
branded="true"
onload="gUpdateWizard.init();"
onwizardfinish="gUpdateWizard.onWizardFinish();"

Просмотреть файл

@ -102,6 +102,11 @@ function uninstall_test_addons(aCallback) {
}
function open_compatibility_window(aInactiveAddonIds, aCallback) {
// This will reset the longer timeout multiplier to 2 which will give each
// test that calls open_compatibility_window a minimum of 60 seconds to
// complete.
requestLongerTimeout(2);
var variant = Cc["@mozilla.org/variant;1"].
createInstance(Ci.nsIWritableVariant);
variant.setFromVariant(aInactiveAddonIds);

Просмотреть файл

@ -52,6 +52,19 @@ registerCleanupFunction(function() {
while (windows.hasMoreElements())
windows.getNext().QueryInterface(Ci.nsIDOMWindow).close();
windows = Services.wm.getEnumerator("Addons:Compatibility");
if (windows.hasMoreElements())
ok(false, "Found unexpected add-ons compatibility window still open");
while (windows.hasMoreElements())
windows.getNext().QueryInterface(Ci.nsIDOMWindow).close();
windows = Services.wm.getEnumerator("Addons:Install");
if (windows.hasMoreElements())
ok(false, "Found unexpected add-ons installation window still open");
while (windows.hasMoreElements())
windows.getNext().QueryInterface(Ci.nsIDOMWindow).close();
// We can for now know that getAllInstalls actually calls its callback before
// it returns so this will complete before the next test start.
AddonManager.getAllInstalls(function(aInstalls) {

Просмотреть файл

@ -20,7 +20,7 @@ function get_item(items, name) {
}
function confirm_install(window) {
items = window.document.getElementById("itemList").childNodes;
let items = window.document.getElementById("itemList").childNodes;
is(items.length, 2, "Should be 2 items listed in the confirmation dialog");
let item = get_item(items, "XPI Test");

Просмотреть файл

@ -21,7 +21,7 @@ function test() {
}
function confirm_install(window) {
items = window.document.getElementById("itemList").childNodes;
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 1, "Should only be 1 item listed in the confirmation dialog");
is(items[0].name, "XPI Test", "Should have seen the name");
is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");

Просмотреть файл

@ -41,7 +41,7 @@ function confirm_install(window) {
var introStringNode = window.document.getElementById("itemWarningIntro");
is(introStringNode.textContent, expectedIntroString, "Should have the correct intro string");
items = window.document.getElementById("itemList").childNodes;
var items = window.document.getElementById("itemList").childNodes;
is(items.length, 5, "Should be 5 items listed in the confirmation dialog");
let item = get_item(items, TESTROOT + "signed.xpi");
if (item) {

Просмотреть файл

@ -47,6 +47,7 @@
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
id="xpinstallConfirm" title="&dialog.title;" style="&dialog.style;"
windowtype="Addons:Install"
onload="XPInstallConfirm.init()"
ondialogaccept="return XPInstallConfirm.onOK();"
ondialogcancel="return XPInstallConfirm.onCancel();">