diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pagemod-test-helpers.js | 34 | ||||
-rw-r--r-- | tests/test-color.js | 2 | ||||
-rw-r--r-- | tests/test-pageMod.js | 8 | ||||
-rw-r--r-- | tests/test-util.js | 4 | ||||
-rw-r--r-- | tests/test-xmlrpc.js | 4 |
5 files changed, 26 insertions, 26 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); diff --git a/tests/test-color.js b/tests/test-color.js index 95d3e16..730bac6 100644 --- a/tests/test-color.js +++ b/tests/test-color.js @@ -1,4 +1,4 @@ -/*global exports: false, require: false */ +/* global exports: false, require: false */ // TODO: add some failing tests as well "use strict"; // var util = require("color"); diff --git a/tests/test-pageMod.js b/tests/test-pageMod.js index 31cb3dd..02b7faf 100644 --- a/tests/test-pageMod.js +++ b/tests/test-pageMod.js @@ -28,21 +28,21 @@ exports.ensureMessagesWork = function(test) { }; /* - * + * * var theURL = main.theURL; var testURL = * self.data.url('tests/change-more-bugs01.html'); - * + * * var contentScriptLibraries = { "bugzilla.redhat.com": [ * self.data.url("util.js"), self.data.url("color.js"), * self.data.url("rhbzpage.js"), self.data.url("bzpage.js") ] }; - * + * * libbz.initialize(libbz.config, function () { pageMod.PageMod({ include: [ * "https://bugzilla.redhat.com/show_bug.cgi?id=*" ], contentScriptWhen: * 'ready', contentScriptFile: contentScriptLibraries["bugzilla.redhat.com"], * onAttach: function onAttach(worker, msg) { console.log("worker: " + worker); * worker.on('message', function (msg) { messageHandler(worker, msg); }); } }); * }); - * + * * pageMod.PageMod({ include: [ "https://bugzilla.redhat.com/process_bug.cgi" ], * contentScriptWhen: 'ready', contentScriptFile: self.data.url("skip-bug.js") * }); diff --git a/tests/test-util.js b/tests/test-util.js index 7ab6280..126436e 100644 --- a/tests/test-util.js +++ b/tests/test-util.js @@ -1,5 +1,5 @@ -/*global exports: false, require: false */ -/*jslint plusplus: false */ +/* global exports: false, require: false */ +/* jslint plusplus: false */ // TODO: add some failing tests as well "use strict"; var util = require("util"); diff --git a/tests/test-xmlrpc.js b/tests/test-xmlrpc.js index 78bf9d5..f9bbfa7 100644 --- a/tests/test-xmlrpc.js +++ b/tests/test-xmlrpc.js @@ -1,5 +1,5 @@ -/*global exports: false, require: false */ -/*jslint plusplus: false */ +/* global exports: false, require: false */ +/* jslint plusplus: false */ "use strict"; var xrpc = require("xmlrpc"); var xmlOut = "<?xml version=\"1.0\"?>\n" |