Browse files

Fix ScriptishLogger tests

  • Loading branch information...
1 parent e636052 commit 497bd225f1b9486e436bff245fa46c7f2f0cd636 @nmaier nmaier committed Sep 20, 2012
Showing with 6 additions and 12 deletions.
  1. +6 −12 extension/content/tests/testScriptishLogger.js
View
18 extension/content/tests/testScriptishLogger.js
@@ -109,22 +109,21 @@ asyncTest("null char removed", 1, function() {
// logScriptError
-asyncTest("logScriptError: js error", 9, function() {
+asyncTest("logScriptError: js error", 7, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
equal(message.errorMessage, "[baz] Error: foo");
equal(message.sourceName, "chrome://scriptish/content/tests/testScriptishLogger.js");
equal(message.sourceLine, "");
ok(message.lineNumber > 10);
- equal(message.columnNumber, 0);
equal(message.category, "scriptish userscript error");
equal(message.flags, message.errorFlag);
});
Scriptish_logScriptError(new Error("foo"), window, "bar.js", "baz");
});
-asyncTest("logScriptError: nsIScriptError", 9, function() {
+asyncTest("logScriptError: nsIScriptError", 8, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
@@ -141,7 +140,7 @@ asyncTest("logScriptError: nsIScriptError", 9, function() {
Scriptish_logScriptError(se, window, "bar.js", "baz");
});
-asyncTest("logScriptError: nsIScriptError; omit id", 9, function() {
+asyncTest("logScriptError: nsIScriptError; omit id", 8, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
@@ -158,8 +157,7 @@ asyncTest("logScriptError: nsIScriptError; omit id", 9, function() {
Scriptish_logScriptError(se, window);
});
-asyncTest("test nsIScriptError; omit optionals", function() {
- expect(9);
+asyncTest("test nsIScriptError; omit optionals", 8, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
@@ -176,33 +174,29 @@ asyncTest("test nsIScriptError; omit optionals", function() {
Scriptish_logScriptError(se, window);
});
-asyncTest("test nsIException", function() {
- expect(9);
+asyncTest("test nsIException", 7, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
equal(message.errorMessage, "[baz] foo");
equal(message.sourceName, "chrome://scriptish/content/tests/testScriptishLogger.js");
equal(message.sourceLine, "");
ok(message.lineNumber > 10);
- equal(message.columnNumber, 0);
equal(message.category, "scriptish userscript error");
equal(message.flags, message.errorFlag);
});
var ex = Components.Exception("foo");
Scriptish_logScriptError(ex, window, "bar.js", "baz");
});
-asyncTest("test TypeError", function() {
- expect(9);
+asyncTest("test TypeError", 7, function() {
runListener(function(message) {
ok(message instanceof Ci.nsIScriptError);
equal(message.errorMessage, "[baz] TypeError: f is undefined");
equal(message.sourceName, "chrome://scriptish/content/tests/testScriptishLogger.js");
equal(message.sourceLine, "");
ok(message.lineNumber > 10);
- equal(message.columnNumber, 0);
equal(message.category, "scriptish userscript error");
equal(message.flags, message.errorFlag);
});

0 comments on commit 497bd22

Please sign in to comment.