Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / transitions / interrupt-transform-transition.html
blob568596a504f6066f3ce5c902f867d73cf24fbdbb
1 <html>
2 <head>
3 <style>
4 .box {
5 position: relative;
6 top: 0;
7 left: 0;
8 width: 100px;
9 height: 100px;
10 background-color: blue;
11 -webkit-transition-property: transform;
12 -webkit-transition-duration: 2s;
13 transform: translate(0, 0);
15 </style>
16 <script>
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 testRunner.waitUntilDone();
22 function test()
24 var t = window.getComputedStyle(document.getElementById('box')).transform;
25 // grab the x value from the matrix()
26 var lastValueRE = /([\.\d]+),[^,]+\)$/;
27 var xTranslate = lastValueRE.exec(t)[1];
28 var result = (xTranslate > 0) ? 'PASS' : 'FAIL: transition should be re-targeted from 200px in x, so x > 0';
29 document.getElementById('result').innerHTML = result;
31 if (window.testRunner)
32 testRunner.notifyDone();
35 function startTest()
37 var box = document.getElementById('box');
38 box.style.transform = 'translate(200px, 0)';
40 window.setTimeout(function() {
41 box.style.transform = 'translate(0, 200px)';
42 window.setTimeout(test, 0);
43 }, 300);
46 </script>
47 </head>
48 <body onload="startTest()">
49 <p>Interrupted transition should not jump back to pre-transition transform</p>
50 <div id="box" class="box">
51 </div>
52 <div id="result">
53 </div>
54 </body>
55 </html>