aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-pageMod.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-pageMod.js')
-rw-r--r--tests/test-pageMod.js74
1 files changed, 37 insertions, 37 deletions
diff --git a/tests/test-pageMod.js b/tests/test-pageMod.js
index 8662a4c..5434bbd 100644
--- a/tests/test-pageMod.js
+++ b/tests/test-pageMod.js
@@ -13,15 +13,15 @@ var testURL = self.data.url('tests/change-more-bugs01.html');
var JSONifiedMessage = '{"cmd":"testMessage","data":{"a":"first","b":"second"}}';
exports.ensureMessagesWork = function(test) {
- var msg = new utilMod.Message("testMessage", { a: "first", b: "second" } );
- test.assertEqual(msg.cmd, "testMessage",
- "msg.cmd comes over well");
- test.assertEqual(msg.data.a, "first",
- "msg.data.a comes over well");
- test.assertEqual(msg.data.b, "second",
- "msg.data.b comes over well");
- test.assertEqual(JSON.stringify(msg), JSONifiedMessage,
- "JSONification of Message works as well");
+ var msg = new utilMod.Message("testMessage", { a: "first", b: "second" } );
+ test.assertEqual(msg.cmd, "testMessage",
+ "msg.cmd comes over well");
+ test.assertEqual(msg.data.a, "first",
+ "msg.data.a comes over well");
+ test.assertEqual(msg.data.b, "second",
+ "msg.data.b comes over well");
+ test.assertEqual(JSON.stringify(msg), JSONifiedMessage,
+ "JSONification of Message works as well");
};
/*
@@ -30,36 +30,36 @@ 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")
- ]
+ "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({
+ pageMod.PageMod({
include: [
- "https://bugzilla.redhat.com/process_bug.cgi"
+ "https://bugzilla.redhat.com/show_bug.cgi?id=*"
],
contentScriptWhen: 'ready',
- contentScriptFile: self.data.url("skip-bug.js")
+ 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")
});
*/
@@ -96,12 +96,12 @@ var ensureSimplePageLoad = function (test) {
var ensurePageLoadsWell = function (test) {
var wm = Cc['@mozilla.org/appshell/window-mediator;1']
- .getService(Ci.nsIWindowMediator);
+ .getService(Ci.nsIWindowMediator);
var browserWindow = wm.getMostRecentWindow("navigator:browser");
if (!browserWindow) {
- test.fail("page-mod tests: could not find the browser window, so " +
- "will not run. Use -a firefox to run the pagemod tests.");
- return null;
+ test.fail("page-mod tests: could not find the browser window, so " +
+ "will not run. Use -a firefox to run the pagemod tests.");
+ return null;
}
var loader = test.makeSandboxedLoader();