diff --git a/mozilla/testing/mochitest/browser-test.js b/mozilla/testing/mochitest/browser-test.js index eb09234eaac..593419704bc 100644 --- a/mozilla/testing/mochitest/browser-test.js +++ b/mozilla/testing/mochitest/browser-test.js @@ -125,6 +125,13 @@ function testScope(aTests) { this.todo = function test_todo(condition, name, diag) { self.tests.push(new testResult(!condition, name, diag, true)); } + this.todo_is = function test_todo_is(a, b, name) { + self.todo(a == b, name, "Got " + a + ", expected " + b); + }, + this.todo_isnot = function test_todo_isnot(a, b, name) { + self.todo(a != b, name, "Didn't expect " + a + ", but got it"); + }, + this.waitForExplicitFinish = function test_WFEF() { self.done = false; } diff --git a/mozilla/testing/mochitest/tests/browser/browser_fail.js b/mozilla/testing/mochitest/tests/browser/browser_fail.js index 07e1571e45e..3d91439ea2c 100644 --- a/mozilla/testing/mochitest/tests/browser/browser_fail.js +++ b/mozilla/testing/mochitest/tests/browser/browser_fail.js @@ -3,4 +3,6 @@ function test() { is(true, false, "fail is"); isnot(true, true, "fail isnot"); todo(true, "fail todo"); + todo_is(true, true, "fail todo_is"); + todo_isnot(true, false, "fail todo_isnot"); } diff --git a/mozilla/testing/mochitest/tests/browser/browser_pass.js b/mozilla/testing/mochitest/tests/browser/browser_pass.js index b5d9dbf8cf1..ac35b5e522c 100644 --- a/mozilla/testing/mochitest/tests/browser/browser_pass.js +++ b/mozilla/testing/mochitest/tests/browser/browser_pass.js @@ -1,8 +1,10 @@ function test() { - is(true, true, "pass is"); ok(true, "pass ok"); + is(true, true, "pass is"); isnot(false, true, "pass isnot"); todo(false, "pass todo"); + todo_is(false, true, "pass todo_is"); + todo_isnot(true, true, "pass todo_isnot"); var func = is; func(true, true, "pass indirect is");