OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #target { | 3 #target { |
4 -webkit-clip-path: circle(0px, 0px, 0px); | 4 -webkit-clip-path: circle(0px at 0px 0px); |
5 transition: -webkit-clip-path 1s; | 5 transition: -webkit-clip-path 1s; |
6 } | 6 } |
7 </style> | 7 </style> |
8 This test must be run under the test harness. | 8 This test must be run under the test harness. |
9 <div id="target"></div> | 9 <div id="target"></div> |
10 <script> | 10 <script> |
11 if (window.testRunner) { | 11 if (window.testRunner) { |
12 testRunner.dumpAsText(); | 12 testRunner.dumpAsText(); |
13 testRunner.waitUntilDone(); | 13 testRunner.waitUntilDone(); |
14 } | 14 } |
15 var target = document.getElementById('target'); | 15 var target = document.getElementById('target'); |
16 var result = ''; | 16 var result = ''; |
17 onload = function() { | 17 onload = function() { |
18 target.style.webkitClipPath = getComputedStyle(target).webkitClipPath; | 18 target.style.webkitClipPath = getComputedStyle(target).webkitClipPath; |
19 requestAnimationFrame(step1); | 19 requestAnimationFrame(step1); |
20 }; | 20 }; |
21 function step1() { | 21 function step1() { |
22 target.offsetTop; | 22 target.offsetTop; |
23 if (window.internals) { | 23 if (window.internals) { |
24 result = (internals.numberOfActiveAnimations() == 0) ? | 24 result = (internals.numberOfActiveAnimations() == 0) ? |
25 'PASS - No transition started.' : | 25 'PASS - No transition started.' : |
26 'FAIL - Unexpected transition started.'; | 26 'FAIL - Unexpected transition started.'; |
27 } | 27 } |
28 target.style.webkitClipPath = 'circle(0px, 0px, 200px)'; | 28 target.style.webkitClipPath = 'circle(200px at 0px 0px)'; |
29 requestAnimationFrame(step2); | 29 requestAnimationFrame(step2); |
30 } | 30 } |
31 function step2() { | 31 function step2() { |
32 if (window.internals) { | 32 if (window.internals) { |
33 result += (internals.numberOfActiveAnimations() == 1) ? | 33 result += (internals.numberOfActiveAnimations() == 1) ? |
34 '\nPASS - Transition started.' : | 34 '\nPASS - Transition started.' : |
35 '\nFAIL - Transition did not start.'; | 35 '\nFAIL - Transition did not start.'; |
36 document.documentElement.style.whiteSpace = 'pre'; | 36 document.documentElement.style.whiteSpace = 'pre'; |
37 document.documentElement.textContent = result; | 37 document.documentElement.textContent = result; |
38 } | 38 } |
39 if (window.testRunner) { | 39 if (window.testRunner) { |
40 testRunner.notifyDone(); | 40 testRunner.notifyDone(); |
41 } | 41 } |
42 } | 42 } |
43 </script> | 43 </script> |
OLD | NEW |