aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-05-13 12:20:05 +0200
commit97f8f5ad45a8dfbde27f555eafec5d8318ad67b2 (patch)
treea81faa56305eba7d3900257b971d9eafac0dbd89 /tests
parent95c260d3edeeb85194193bfcbd1e991e4dadadbc (diff)
downloadbugzilla-triage-97f8f5ad45a8dfbde27f555eafec5d8318ad67b2.tar.gz
Really Eclipseize formatting.
Diffstat (limited to 'tests')
-rw-r--r--tests/pagemod-test-helpers.js34
-rw-r--r--tests/test-color.js2
-rw-r--r--tests/test-pageMod.js8
-rw-r--r--tests/test-util.js4
-rw-r--r--tests/test-xmlrpc.js4
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"