Bug 1061813 - Added a check to test whether this.currentTest.scope.test is a function. r=jmaher

This commit is contained in:
Amod Narvekar 2015-06-11 10:15:00 +02:00
Родитель 10c812cd9d
Коммит 9301112428
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

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