From a7262d3f642492a1ced557f2d254b8272ba4d944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Fri, 10 Jun 2011 11:58:45 +0200 Subject: [PATCH] remove redundant jsm imports from browser chrome tests --HG-- extra : rebase_source : 3eee5463d514dfe1f62cd59a9c317e31903e7313 --- browser/base/content/test/browser_tabMatchesInAwesomebar.js | 2 -- .../places/tests/browser/browser_markPageAsFollowedLink.js | 2 -- browser/components/preferences/tests/browser_permissions.js | 1 - modules/libpr0n/test/browser/head.js | 6 ------ toolkit/components/console/hudservice/tests/browser/head.js | 6 ------ .../components/places/tests/browser/browser_bug399606.js | 2 -- toolkit/components/places/tests/browser/browser_settitle.js | 2 -- toolkit/components/places/tests/browser/browser_visituri.js | 2 -- .../places/tests/browser/browser_visituri_nohistory.js | 3 --- .../tests/browser/browser_visituri_privatebrowsing.js | 3 --- .../mozapps/extensions/test/browser/browser_bug523784.js | 2 -- toolkit/mozapps/extensions/test/browser/head.js | 1 - toolkit/mozapps/extensions/test/xpinstall/head.js | 1 - 13 files changed, 33 deletions(-) diff --git a/browser/base/content/test/browser_tabMatchesInAwesomebar.js b/browser/base/content/test/browser_tabMatchesInAwesomebar.js index fdfb0a1bfe8a..c321dbecf654 100644 --- a/browser/base/content/test/browser_tabMatchesInAwesomebar.js +++ b/browser/base/content/test/browser_tabMatchesInAwesomebar.js @@ -36,8 +36,6 @@ * * ***** END LICENSE BLOCK ***** */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - const TEST_URL_BASES = [ "http://example.org/browser/browser/base/content/test/dummy_page.html#tabmatch", "http://example.org/browser/browser/base/content/test/moz.png#tabmatch" diff --git a/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js b/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js index c9def1d2fcd1..035fe75a3afc 100644 --- a/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js +++ b/browser/components/places/tests/browser/browser_markPageAsFollowedLink.js @@ -11,8 +11,6 @@ const PAGE_URL = BASE_URL + "/framedPage.html"; const LEFT_URL = BASE_URL + "/frameLeft.html"; const RIGHT_URL = BASE_URL + "/frameRight.html"; -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - let gTabLoaded = false; let gLeftFrameVisited = false; diff --git a/browser/components/preferences/tests/browser_permissions.js b/browser/components/preferences/tests/browser_permissions.js index f9665aadf0de..e1d201f9f94d 100644 --- a/browser/components/preferences/tests/browser_permissions.js +++ b/browser/components/preferences/tests/browser_permissions.js @@ -1,7 +1,6 @@ /* Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ */ -Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/PlacesUtils.jsm"); Components.utils.import("resource://gre/modules/NetUtil.jsm"); diff --git a/modules/libpr0n/test/browser/head.js b/modules/libpr0n/test/browser/head.js index 528495f6e959..ee6efb3dd5d9 100644 --- a/modules/libpr0n/test/browser/head.js +++ b/modules/libpr0n/test/browser/head.js @@ -1,7 +1,3 @@ -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; - const RELATIVE_DIR = "modules/libpr0n/test/browser/"; const TESTROOT = "http://example.com/browser/" + RELATIVE_DIR; const TESTROOT2 = "http://example.org/browser/" + RELATIVE_DIR; @@ -9,8 +5,6 @@ const TESTROOT2 = "http://example.org/browser/" + RELATIVE_DIR; var chrome_root = getRootDirectory(gTestPath); const CHROMEROOT = chrome_root; -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - function getImageLoading(doc, id) { var htmlImg = doc.getElementById(id); return htmlImg.QueryInterface(Ci.nsIImageLoadingContent); diff --git a/toolkit/components/console/hudservice/tests/browser/head.js b/toolkit/components/console/hudservice/tests/browser/head.js index 7a761356b25d..a42582af2a4a 100644 --- a/toolkit/components/console/hudservice/tests/browser/head.js +++ b/toolkit/components/console/hudservice/tests/browser/head.js @@ -36,13 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cu = Components.utils; - Cu.import("resource://gre/modules/HUDService.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); function log(aMsg) { diff --git a/toolkit/components/places/tests/browser/browser_bug399606.js b/toolkit/components/places/tests/browser/browser_bug399606.js index 1dcccf7e5c59..7ce5ad6880c2 100644 --- a/toolkit/components/places/tests/browser/browser_bug399606.js +++ b/toolkit/components/places/tests/browser/browser_bug399606.js @@ -36,8 +36,6 @@ * * ***** END LICENSE BLOCK ***** */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - gBrowser.selectedTab = gBrowser.addTab(); function test() { diff --git a/toolkit/components/places/tests/browser/browser_settitle.js b/toolkit/components/places/tests/browser/browser_settitle.js index ae38051a7326..f8334f8cc108 100644 --- a/toolkit/components/places/tests/browser/browser_settitle.js +++ b/toolkit/components/places/tests/browser/browser_settitle.js @@ -3,8 +3,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - gBrowser.selectedTab = gBrowser.addTab(); function finishAndCleanUp() diff --git a/toolkit/components/places/tests/browser/browser_visituri.js b/toolkit/components/places/tests/browser/browser_visituri.js index 95e8736d63cb..91be553b1f1b 100644 --- a/toolkit/components/places/tests/browser/browser_visituri.js +++ b/toolkit/components/places/tests/browser/browser_visituri.js @@ -3,8 +3,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); - gBrowser.selectedTab = gBrowser.addTab(); function finishAndCleanUp() diff --git a/toolkit/components/places/tests/browser/browser_visituri_nohistory.js b/toolkit/components/places/tests/browser/browser_visituri_nohistory.js index 1f5cd299c017..cf036356251f 100644 --- a/toolkit/components/places/tests/browser/browser_visituri_nohistory.js +++ b/toolkit/components/places/tests/browser/browser_visituri_nohistory.js @@ -3,9 +3,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); - const INITIAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html"; const FINAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/final.html"; diff --git a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js index 79eda7404ce5..4dabd49bc6f1 100644 --- a/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js +++ b/toolkit/components/places/tests/browser/browser_visituri_privatebrowsing.js @@ -3,9 +3,6 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ -Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); - const INITIAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/begin.html"; const FINAL_URL = "http://example.com/tests/toolkit/components/places/tests/browser/final.html"; diff --git a/toolkit/mozapps/extensions/test/browser/browser_bug523784.js b/toolkit/mozapps/extensions/test/browser/browser_bug523784.js index f6b1a601b4af..c467e5cc0186 100644 --- a/toolkit/mozapps/extensions/test/browser/browser_bug523784.js +++ b/toolkit/mozapps/extensions/test/browser/browser_bug523784.js @@ -3,8 +3,6 @@ const URI_BLOCKLIST_DIALOG = "chrome://mozapps/content/extensions/blocklist.xul"; -Components.utils.import("resource://gre/modules/Services.jsm"); - // This tests that the blocklist dialog still affects soft-blocked add-ons // if the user clicks the "Restart Later" button. It also ensures that the // "Cancel" button is correctly renamed (to "Restart Later"). diff --git a/toolkit/mozapps/extensions/test/browser/head.js b/toolkit/mozapps/extensions/test/browser/head.js index 4c3ab6f9ab32..7d5e2f6d2a28 100644 --- a/toolkit/mozapps/extensions/test/browser/head.js +++ b/toolkit/mozapps/extensions/test/browser/head.js @@ -3,7 +3,6 @@ */ Components.utils.import("resource://gre/modules/AddonManager.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); Components.utils.import("resource://gre/modules/NetUtil.jsm"); var pathParts = gTestPath.split("/"); diff --git a/toolkit/mozapps/extensions/test/xpinstall/head.js b/toolkit/mozapps/extensions/test/xpinstall/head.js index 2e8e23784ddd..dc8955d317a5 100644 --- a/toolkit/mozapps/extensions/test/xpinstall/head.js +++ b/toolkit/mozapps/extensions/test/xpinstall/head.js @@ -27,7 +27,6 @@ function extractChromeRoot(path) { } Components.utils.import("resource://gre/modules/AddonManager.jsm"); -Components.utils.import("resource://gre/modules/Services.jsm"); /** * This is a test harness designed to handle responding to UI during the process