Index: LayoutTests/http/tests/security/resources/webaudio/js-test.js |
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/http/tests/security/resources/webaudio/js-test.js |
similarity index 91% |
copy from LayoutTests/resources/js-test.js |
copy to LayoutTests/http/tests/security/resources/webaudio/js-test.js |
index e4d56e4256eeb46c2152ed6dff9559d1c84d6e05..45fa85dcfd7865479fd9aca4638b80cd37038399 100644 |
--- a/LayoutTests/resources/js-test.js |
+++ b/LayoutTests/http/tests/security/resources/webaudio/js-test.js |
@@ -1,8 +1,3 @@ |
-// js-test now supports lazily printing test results which dumps all test |
-// results once at the end of the test instead of building them up. To enable |
-// this option, call setPrintTestResultsLazily() before running any tests. |
-var _lazyTestResults; // Set by setPrintTestResultsLazily(). |
- |
// svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump text + pixel results |
if (self.testRunner) { |
if (self.enablePixelTesting) |
@@ -58,13 +53,9 @@ var unexpectedErrorMessage; // set by onerror when expectingError is not true |
debug = function debug(msg) |
{ |
- if (self._lazyTestResults) { |
- self._lazyTestResults.push(msg); |
- } else { |
- var span = document.createElement("span"); |
- getOrCreate("console", "div").appendChild(span); // insert it first so XHTML knows the namespace |
- span.innerHTML = msg + '<br />'; |
- } |
+ var span = document.createElement("span"); |
+ getOrCreate("console", "div").appendChild(span); // insert it first so XHTML knows the namespace |
+ span.innerHTML = msg + '<br />'; |
}; |
var css = |
@@ -190,16 +181,6 @@ function isResultCorrect(actual, expected) |
return false; |
} |
-// Returns a sorted array of property names of object. This function returns |
-// not only own properties but also properties on prototype chains. |
-function getAllPropertyNames(object) { |
- var properties = []; |
- for (var property in object) { |
- properties.push(property); |
- } |
- return properties.sort(); |
-} |
- |
function stringify(v) |
{ |
if (isNewSVGTearOffType(v)) |
@@ -209,23 +190,6 @@ function stringify(v) |
else return "" + v; |
} |
-// Stringifies a DOM object. This function stringifies not only own properties |
-// but also DOM attributes which are on a prototype chain. Note that |
-// JSON.stringify only stringifies own properties. |
-function stringifyDOMObject(object) |
-{ |
- function deepCopy(src) { |
- if (typeof src != "object") |
- return src; |
- var dst = Array.isArray(src) ? [] : {}; |
- for (var property in src) { |
- dst[property] = deepCopy(src[property]); |
- } |
- return dst; |
- } |
- return JSON.stringify(deepCopy(object)); |
-} |
- |
function evalAndLog(_a, _quiet) |
{ |
if (typeof _a != "string") |
@@ -727,7 +691,6 @@ function shouldHaveHadError(message) |
// function. |
function asyncGC(callback) { |
GCController.collectAll(); |
- // FIXME: we need a better way of waiting for chromium events to happen |
setTimeout(callback, 0); |
} |
@@ -752,14 +715,9 @@ function asyncMinorGC(callback) { |
GCController.minorCollect(); |
else |
testFailed("Minor GC is available only when you enable the --expose-gc option in V8."); |
- // FIXME: we need a better way of waiting for chromium events to happen |
setTimeout(callback, 0); |
} |
-function setPrintTestResultsLazily() { |
- self._lazyTestResults = self._lazyTestResults || []; |
-} |
- |
function isSuccessfullyParsed() |
{ |
// FIXME: Remove this and only report unexpected syntax errors. |
@@ -778,22 +736,6 @@ function finishJSTest() |
if (!self.wasPostTestScriptParsed) |
return; |
isSuccessfullyParsed(); |
- |
- if (self._lazyTestResults && self._lazyTestResults.length > 0) { |
- var consoleElement = document.getElementById("console"); |
- if (!consoleElement) { |
- consoleElement = document.createElement("div"); |
- consoleElement.id = "console"; |
- var parent = document.body || document.documentElement; |
- parent.insertBefore(consoleElement, parent.firstChild); |
- } |
- self._lazyTestResults.forEach(function(msg) { |
- var span = document.createElement("span"); |
- span.innerHTML = msg + '<br />'; |
- consoleElement.appendChild(span); |
- }); |
- } |
- |
if (self.jsTestIsAsync && self.testRunner) |
testRunner.notifyDone(); |
} |