Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Unified Diff: LayoutTests/animations/resources/animation-test-helpers.js

Issue 14805007: Clean up expectations for animation helper tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline LayoutTests/css3/masking/clip-path-animation Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();
}
« no previous file with comments | « LayoutTests/animations/play-state-suspend-expected.txt ('k') | LayoutTests/animations/simultaneous-start-left-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698