blob: 58d5cb81921d559bb9d39b8829543c6613027dc5 [file] [log] [blame]
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +00001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3
4<html lang="en">
5<head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <style>
8 body {
9 margin: 0;
10 }
11
12 div {
13 position: relative;
14 left: 100px;
dino@apple.com60c426a2008-12-03 20:00:58 +000015 height: 50px;
16 width: 50px;
17 background-color: green;
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +000018 -webkit-transition: left 4s linear 1s;
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +000019 }
20
21 .moved {
22 left: 200px;
23 }
simon.fraser@apple.com6510a132009-08-03 19:40:12 +000024 </style>
25 <script src="transition-test-helpers.js" type="text/javascript" charset="utf-8"></script>
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +000026 <script type="text/javascript" charset="utf-8">
27 function endTest() {
28 if (window.layoutTestController) {
29 layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target");
30 var left = window.getComputedStyle(document.getElementById('target')).left;
31 var result = "PASS";
32 if (left != "125px") {
33 result = "FAIL - expected 125px got " + left;
34 }
35 document.getElementById('result').innerHTML = "<p>" + result + "</p>";
36 layoutTestController.notifyDone();
37 }
38 }
39
40 function startTest() {
41 if (window.layoutTestController) {
42 layoutTestController.dumpAsText();
43 layoutTestController.waitUntilDone();
44 }
45
46 document.getElementById("target").className = "moved";
simon.fraser@apple.com6510a132009-08-03 19:40:12 +000047 waitForAnimationStart(endTest, 1);
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +000048 }
49 </script>
50</head>
51<body onload="startTest()">
52 <h1>Test for transition shorthand</h1>
53
dino@apple.com60c426a2008-12-03 20:00:58 +000054 <p>This test works only in DumpRenderTree. It uses an API exposed
55 only there to jump to a particular time in a running transition.
56 Tests bug <a href="https://bugs.webkit.org/show_bug.cgi?id=21247">21247</a>
57 </p>
58
simon.fraser@apple.come5d2c892008-11-21 00:48:46 +000059 <div id="target">
60 </div>
61
62 <div id="result">
63 </div>
64
65</body>
66</html>