Bug 755558 - report exceptions in head.js during browser-test. r=gavin

This commit is contained in:
Mark Hammond 2012-06-15 12:08:17 +10:00
Родитель 80725c5db7
Коммит 44a1bd3a76
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -306,7 +306,14 @@ Tester.prototype = {
var headPath = currentTestDirPath + "/head.js";
try {
this._scriptLoader.loadSubScript(headPath, this.currentTest.scope);
} catch (ex) { /* no head */ }
} catch (ex) {
// Ignore if no head.js exists, but report all other errors. Note this
// will also ignore an existing head.js attempting to import a missing
// module - see bug 755558 for why this strategy is preferred anyway.
if (ex.toString() != 'Error opening input stream (invalid filename?)') {
this.currentTest.addResult(new testResult(false, "head.js import threw an exception", ex, false));
}
}
// Import the test script.
try {