diff options
author | Matěj Cepl <mcepl@redhat.com> | 2011-05-13 12:20:05 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@redhat.com> | 2011-06-05 14:53:47 +0200 |
commit | 83fd7fd92e5b21a177bc16cc7318792cf63a343b (patch) | |
tree | 20f3e5a59eb9ce32a9b9973d7131e7135bd94999 /tests/pagemod-test-helpers.js | |
parent | 5b837d6739a12a516203fa0505ca562839463a79 (diff) | |
download | bugzilla-triage-83fd7fd92e5b21a177bc16cc7318792cf63a343b.tar.gz |
Really Eclipseize formatting.
Diffstat (limited to 'tests/pagemod-test-helpers.js')
-rw-r--r-- | tests/pagemod-test-helpers.js | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/pagemod-test-helpers.js b/tests/pagemod-test-helpers.js index 9980715..aa01e96 100644 --- a/tests/pagemod-test-helpers.js +++ b/tests/pagemod-test-helpers.js @@ -7,28 +7,28 @@ const Ci = require("chrome").Ci; * checks the effect of the page mod on 'onload' event via testCallback. */ exports.testPageMod = function testPageMod(test, testURL, pageModOptions, - testCallback, timeout) { + testCallback, timeout) { var xulApp = require("xul-app"); if (!xulApp.versionInRange(xulApp.platformVersion, "1.9.3a3", "*") && - !xulApp.versionInRange(xulApp.platformVersion, "1.9.2.7", "1.9.2.*")) { - test.pass("Note: not testing PageMod, as it doesn't work on this platform version"); - return null; + !xulApp.versionInRange(xulApp.platformVersion, "1.9.2.7", "1.9.2.*")) { + test.pass("Note: not testing PageMod, as it doesn't work on this platform version"); + return null; } var wm = Cc['@mozilla.org/appshell/window-mediator;1'] - .getService(Ci.nsIWindowMediator); + .getService(Ci.nsIWindowMediator); var browserWindow = wm.getMostRecentWindow("navigator:browser"); if (!browserWindow) { - test.pass("page-mod tests: could not find the browser window, so " + - "will not run. Use -a firefox to run the pagemod tests."); - return null; + test.pass("page-mod tests: could not find the browser window, so " + + "will not run. Use -a firefox to run the pagemod tests."); + return null; } if (timeout !== undefined) { - test.waitUntilDone(timeout); + test.waitUntilDone(timeout); } else { - test.waitUntilDone(); + test.waitUntilDone(); } let loader = test.makeSandboxedLoader(); @@ -42,13 +42,13 @@ exports.testPageMod = function testPageMod(test, testURL, pageModOptions, var b = tabBrowser.getBrowserForTab(newTab); function onPageLoad() { - b.removeEventListener("load", onPageLoad, true); - testCallback(b.contentWindow.wrappedJSObject, function done() { - pageMods.forEach(function(mod) {mod.destroy()}); - // XXX leaks reported if we don't close the tab? - tabBrowser.removeTab(newTab); - test.done(); - }); + b.removeEventListener("load", onPageLoad, true); + testCallback(b.contentWindow.wrappedJSObject, function done() { + pageMods.forEach(function(mod) {mod.destroy()}); + // XXX leaks reported if we don't close the tab? + tabBrowser.removeTab(newTab); + test.done(); + }); } b.addEventListener("load", onPageLoad, true); |