Bug 1345600 - Remove the empty script element workaround in jstests' browser.js. r=sfink
--- a/js/src/tests/browser.js
+++ b/js/src/tests/browser.js
@@ -511,17 +511,18 @@
// No error is expected.
expectedError = "Unknown";
}
if (properties.gczeal) {
gczeal(Number(properties.gczeal));
}
- document.write(`<title>${ properties.test }<\/title>`);
+ // Display the test path in the title.
+ document.title = properties.test;
// Output script tags for shell.js, then browser.js, at each level of the
// test path hierarchy.
var prepath = "";
var scripts = [];
for (var i = 0; i < testpathparts.length - 1; i++) {
prepath += testpathparts[i] + "/";
@@ -532,20 +533,16 @@
// Output the test script itself.
var moduleTest = !!properties.module;
scripts.push({src: prepath + testFileName, module: moduleTest});
// Finally output the driver-end script to advance to the next test.
scripts.push({src: "js-test-driver-end.js", module: false});
if (!moduleTest) {
- // XXX bc - the first document.written script is ignored if the protocol
- // is file:. insert an empty script tag, to work around it.
- document.write("<script></script>");
-
var key, value;
if (properties.language !== "type") {
key = "language";
value = "javascript";
if (properties.version) {
value += properties.version;
}
} else {