Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / matched-transform-functions.html
blob4c96de44006055b23cb928099b3b709a1b91bae2
1 <!DOCTYPE html>
3 <html>
4 <head>
5 <style>
6 #box {
7 height: 100px;
8 width: 100px;
9 background-color: blue;
10 -webkit-transition-property: transform;
11 -webkit-transition-duration: 3s;
12 transform: translate(0, 0) rotate(0);
15 </style>
16 <script>
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
22 function test()
24 var c = new WebKitCSSMatrix(window.getComputedStyle(document.getElementById('box')).transform);
25 var result = (c.f < 200) ? 'PASS' : 'FAIL: transition should still be running, so y < 200';
26 document.getElementById('result').innerHTML = result;
28 if (window.testRunner)
29 testRunner.notifyDone();
32 function startTest()
34 var box = document.getElementById('box');
35 box.style.transform = 'translate(100px, 0) rotate(0)';
37 window.setTimeout(function() {
38 box.style.transform = 'translate(0, 200px) rotate(10deg)';
39 window.setTimeout(function() {
40 test();
41 }, 200);
42 }, 300);
44 window.addEventListener('load', startTest, false)
45 </script>
46 </head>
47 <body>
48 <p>Box should start moving right, then move down</p>
49 <div id="box">
50 </div>
52 <div id="result">
53 </div>
54 </body>
55 </html>