summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html
diff options
context:
space:
mode:
authorpol@apple.com <pol@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2008-12-11 00:48:35 +0000
committerpol@apple.com <pol@apple.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2008-12-11 00:48:35 +0000
commit1fd55de24dfef62ef78e1d3517da205ea3c70633 (patch)
tree095146d2e8103b77e2afef6f2118a5c2bed4ab72 /third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html
parentabe06b27f44658d898136a7801953e8eabb8cc9e (diff)
downloadchromium_src-1fd55de24dfef62ef78e1d3517da205ea3c70633.zip
chromium_src-1fd55de24dfef62ef78e1d3517da205ea3c70633.tar.gz
chromium_src-1fd55de24dfef62ef78e1d3517da205ea3c70633.tar.bz2
2008-12-10 Pierre-Olivier Latour <pol@apple.com>
Reviewed by Darin Adler. Rewrote animations/animation-test-helpers.js to take advantage of the pauseAnimationAtTimeOnElementWithId() API when available in DRT. Updated all animations tests that check for values of animated CSS properties to use these new helper functions. https://bugs.webkit.org/show_bug.cgi?id=22796 * animations/animation-test-helpers.js: (isCloseEnough): (checkExpectedValue): (endTest): (startTest): (runAnimationTest): * animations/big-rotation-expected.txt: * animations/big-rotation.html: * animations/change-keyframes-expected.txt: * animations/change-keyframes-name-expected.txt: * animations/change-keyframes-name.html: * animations/change-keyframes.html: * animations/change-one-anim-expected.txt: * animations/change-one-anim.html: * animations/generic-from-to-expected.txt: * animations/generic-from-to.html: * animations/import-expected.txt: * animations/import.html: * animations/keyframe-timing-functions-expected.txt: * animations/keyframe-timing-functions.html: * animations/keyframes-comma-separated-expected.txt: * animations/keyframes-comma-separated.html: * animations/keyframes-expected.txt: * animations/keyframes-from-missing.html: * animations/keyframes-out-of-order-expected.txt: * animations/keyframes-out-of-order.html: * animations/keyframes-to-missing.html: * animations/keyframes.html: * animations/lineheight-animation-expected.txt: * animations/lineheight-animation.html: * animations/matrix-anim-expected.txt: * animations/matrix-anim.html: * animations/multiple-animations-expected.txt: * animations/multiple-animations.html: * animations/multiple-keyframes-expected.txt: * animations/multiple-keyframes.html: * animations/transition-and-animation-1-expected.txt: * animations/transition-and-animation-1.html: * animations/transition-and-animation-2-expected.txt: * animations/transition-and-animation-2.html: * animations/width-using-ems-expected.txt: * animations/width-using-ems.html: * platform/win/Skipped: git-svn-id: svn://svn.chromium.org/blink/trunk@39187 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html')
-rw-r--r--third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html41
1 files changed, 7 insertions, 34 deletions
diff --git a/third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html b/third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html
index fef2b07..676f0c8 100644
--- a/third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html
+++ b/third_party/WebKit/LayoutTests/animations/keyframe-timing-functions.html
@@ -34,42 +34,15 @@
}
</style>
+ <script src="animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
- if (window.layoutTestController) {
- layoutTestController.dumpAsText();
- layoutTestController.waitUntilDone();
- }
-
- result = "PASS";
- const kDefaultTolerance = 20;
-
- function isEqual(actual, desired, tolerance)
- {
- if (tolerance == undefined || tolerance == 0)
- tolerance = kDefaultTolerance;
- var diff = Math.abs(actual - desired);
- return diff < tolerance;
- }
-
- function snapshot()
- {
- var left = parseInt(window.getComputedStyle(document.getElementById('box')).left);
- var expected = 300;
- if (!isEqual(left, expected))
- result = "FAIL (was: " + left + ", expected: " + expected + ")";
-
- document.getElementById('result').innerHTML = result;
- if (window.layoutTestController)
- layoutTestController.notifyDone();
- }
-
- function start()
- {
- window.setTimeout(snapshot, 750);
- }
-
- document.addEventListener('webkitAnimationStart', start, false);
+ const expectedValues = [
+ // [animation-name, time, element-id, property, expected-value, tolerance]
+ ["move", 0.75, "box", "left", 300, 20],
+ ];
+
+ runAnimationTest(expectedValues);
</script>
</head>
<body>