Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: LayoutTests/transitions/webkit-clip-path-equality.html

Issue 200633005: [CSS Shapes] Remove deprecated shapes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix test expectations Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698