зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1061813 - Added a check to test whether this.currentTest.scope.test is a function. r=jmaher
This commit is contained in:
Родитель
10c812cd9d
Коммит
9301112428
|
@ -766,8 +766,10 @@ Tester.prototype = {
|
|||
var result = this.currentTest.scope.generatorTest();
|
||||
this.currentTest.scope.__generator = result;
|
||||
result.next();
|
||||
} else {
|
||||
} else if (typeof this.currentTest.scope.test == "function") {
|
||||
this.currentTest.scope.test();
|
||||
} else {
|
||||
throw "This test didn't call add_task, nor did it define a generatorTest() function, nor did it define a test() function, so we don't know how to run it.";
|
||||
}
|
||||
} catch (ex) {
|
||||
let isExpected = !!this.SimpleTest.isExpectingUncaughtException();
|
||||
|
|
Загрузка…
Ссылка в новой задаче