Bug 1051066 - fix mochitest-chrome for single test runs, r=ted

--HG--
extra : rebase_source : 85ddaf183d33014d86b5659db10871b9ae2abc94
This commit is contained in:
Gijs Kruitbosch 2014-08-09 09:26:53 +01:00
parent a263dd4d86
commit 55dd0d3812
2 changed files with 5 additions and 3 deletions

View File

@ -337,7 +337,7 @@ class MochitestRunner(MozbuildObject):
manifest = TestManifest()
manifest.tests.extend(tests)
if (len(tests) == 1):
if len(tests) == 1:
options.closeWhenDone = False
options.manifestFile = manifest

View File

@ -517,9 +517,11 @@ TestRunner.runTests = function (/*url...*/) {
var singleTestRun = this._urls.length <= 1 && TestRunner.repeat <= 1;
TestRunner.showTestReport = singleTestRun;
var frame = $('testframe');
frame.src="";
frame.src = "";
if (singleTestRun) {
document.body.setAttribute("singletest", singleTestRun);
// Can't use document.body because this runs in a XUL doc as well...
var body = document.getElementsByTagName("body")[0];
body.setAttribute("singletest", "true");
frame.removeAttribute("scrolling");
}
TestRunner._checkForHangs();