From 8cfb01a2d5bbdf36a068f6253b71b40736b7e33c Mon Sep 17 00:00:00 2001 From: Robert Strong Date: Mon, 1 Nov 2010 14:30:07 -0700 Subject: [PATCH] Bug 608507 - some minor test cleanup. r=dtownsend, a=test fix --- .../extensions/test/browser/browser_bug557956.js | 14 +++++++------- .../test/xpinstall/browser_signed_naming.js | 2 +- .../test/xpinstall/browser_signed_trigger.js | 2 +- .../test/xpinstall/browser_signed_untrusted.js | 2 +- .../test/xpinstall/browser_signed_url.js | 2 +- .../test/xpinstall/browser_trigger_redirect.js | 2 +- .../test/xpinstall/browser_unsigned_trigger.js | 2 +- .../xpinstall/browser_unsigned_trigger_iframe.js | 2 +- .../test/xpinstall/browser_unsigned_url.js | 2 +- .../extensions/test/xpinstall/browser_whitelist.js | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug557956.js b/toolkit/mozapps/extensions/test/browser/browser_bug557956.js index 7ea3da9bbb3..31aa5885d90 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_bug557956.js +++ b/toolkit/mozapps/extensions/test/browser/browser_bug557956.js @@ -387,14 +387,14 @@ add_test(function() { ]; open_compatibility_window(inactiveAddonIds, function(aWindow) { - var doc = aWindow.document; - wait_for_page(aWindow, "mismatch", function(aWindow) { - var items = get_list_names(doc.getElementById("mismatch.incompatible")); - is(items.length, 1, "Should have seen 1 still incompatible items"); - is(items[0], "Addon3 1.0", "Should have seen addon3 still incompatible"); + var doc = aWindow.document; + wait_for_page(aWindow, "mismatch", function(aWindow) { + var items = get_list_names(doc.getElementById("mismatch.incompatible")); + is(items.length, 1, "Should have seen 1 still incompatible items"); + is(items[0], "Addon3 1.0", "Should have seen addon3 still incompatible"); - var button = doc.documentElement.getButton("next"); - EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow); + var button = doc.documentElement.getButton("next"); + EventUtils.synthesizeMouse(button, 2, 2, { }, aWindow); wait_for_page(aWindow, "noupdates", function(aWindow) { var button = doc.documentElement.getButton("finish"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_naming.js b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_naming.js index 6c0d60ebc95..f0c4f4286ee 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_naming.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_naming.js @@ -30,7 +30,7 @@ function get_item(items, url) { } function confirm_install(window) { - items = window.document.getElementById("itemList").childNodes; + let items = window.document.getElementById("itemList").childNodes; is(items.length, 3, "Should be 3 items listed in the confirmation dialog"); let item = get_item(items, TESTROOT + "signed.xpi"); if (item) { diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js index ffb21f38c0e..cefce2a4c37 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_trigger.js @@ -18,7 +18,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, "Signed XPI Test", "Should have seen the name from the trigger list"); is(items[0].url, TESTROOT + "signed.xpi", "Should have listed the correct url for the item"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js index 70dd11479ec..afb34d8a3f6 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_untrusted.js @@ -18,7 +18,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, "Signed XPI Test", "Should have had the filename for the item name"); is(items[0].url, TESTROOT + "signed-untrusted.xpi", "Should have listed the correct url for the item"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js index b6a8860f04f..351092a435a 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_signed_url.js @@ -11,7 +11,7 @@ function test() { } function confirm_install(window) { - items = window.document.getElementById("itemList").childNodes; + let items = window.document.getElementById("itemList").childNodes; is(items.length, 1, "Should only be 1 item listed in the confirmation dialog"); is(items[0].name, "Signed XPI Test", "Should have had the name"); is(items[0].url, TESTROOT + "signed.xpi", "Should have listed the correct url for the item"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js b/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js index e47f40e646b..c953698bcda 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_trigger_redirect.js @@ -14,7 +14,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"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js index ec374e56779..4e2046306b1 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger.js @@ -22,7 +22,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"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js index e0422a5e601..34073b0bddb 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_trigger_iframe.js @@ -23,7 +23,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"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js index e0f783732db..bc3be4f9e37 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_unsigned_url.js @@ -11,7 +11,7 @@ function test() { } function confirm_install(window) { - items = window.document.getElementById("itemList").childNodes; + let 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 had the filename for the item name"); is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js index c4d1900fb08..b3be94c6a8c 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js +++ b/toolkit/mozapps/extensions/test/xpinstall/browser_whitelist.js @@ -23,7 +23,7 @@ function allow_blocked(installInfo) { } 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 from the trigger list"); is(items[0].url, TESTROOT + "unsigned.xpi", "Should have listed the correct url for the item");