Index: LayoutTests/animations/resources/animation-test-helpers.js |
diff --git a/LayoutTests/animations/resources/animation-test-helpers.js b/LayoutTests/animations/resources/animation-test-helpers.js |
index a34bcb07c8a6336c61726be3b83e13e8ec6b7705..4670e89d9b088e829b7281d405d006285f346ee9 100644 |
--- a/LayoutTests/animations/resources/animation-test-helpers.js |
+++ b/LayoutTests/animations/resources/animation-test-helpers.js |
@@ -353,7 +353,8 @@ function comparePropertyValue(property, computedValue, expectedValue, tolerance) |
function endTest() |
{ |
- document.getElementById('result').innerHTML = result; |
+ var resultElement = useResultElement ? document.getElementById('result') : document.documentElement; |
+ resultElement.innerHTML = result; |
if (window.testRunner) |
testRunner.notifyDone(); |
@@ -397,6 +398,7 @@ function startTest(checks) |
runChecksWithRAF(checks); |
} |
+var useResultElement = false; |
var result = ""; |
var hasPauseAnimationAPI; |
var animStartTime; |
@@ -404,6 +406,8 @@ var animStartTime; |
// FIXME: remove deprecatedEvent, disablePauseAnimationAPI and doPixelTest |
function runAnimationTest(expected, callbacks, deprecatedEvent, disablePauseAnimationAPI, doPixelTest) |
{ |
+ if (disablePauseAnimationAPI) |
+ result += 'Warning this test is running in real-time and may be flaky.<br>'; |
if (deprecatedEvent) |
throw 'Event argument is deprecated!'; |
if (!expected) |
@@ -430,9 +434,11 @@ function runAnimationTest(expected, callbacks, deprecatedEvent, disablePauseAnim |
checks[timeMs].push(checkExpectedValue.bind(null, expected, i)); |
} |
+ var doPixelTest = Boolean(doPixelTest); |
+ useResultElement = doPixelTest; |
+ |
if (window.testRunner) { |
- if (!doPixelTest) |
- testRunner.dumpAsText(); |
+ testRunner.dumpAsText(doPixelTest); |
testRunner.waitUntilDone(); |
} |