bug 413416: implement todo_is and todo_isnot for MochiTest browser chrome harness; r=gavin, a=beltzner

git-svn-id: svn://10.0.0.236/trunk@244020 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
myk%mozilla.org
2008-01-25 23:33:17 +00:00
parent 8e4393a9de
commit 5fff22e2d3
3 changed files with 12 additions and 1 deletions

View File

@@ -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;
}

View File

@@ -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");
}

View File

@@ -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");