diff --git a/testing/mochitest/browser-test.js b/testing/mochitest/browser-test.js index 3fcbcb707442..7e62da6bd7f5 100644 --- a/testing/mochitest/browser-test.js +++ b/testing/mochitest/browser-test.js @@ -909,9 +909,9 @@ function testScope(aTester, aTest, expected) { var self = this; this.ok = function test_ok(condition, name, diag, stack) { - if (self.__expected == 'fail') { + if (this.__expected == 'fail') { if (!condition) { - self.__num_failed++; + this.__num_failed++; condition = true; } }