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

Side by Side Diff: LayoutTests/css3/calc/transitions-dependent.html

Issue 14556022: Simplify animation testing API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <style> 2 <style>
3 .outerBlock { 3 .outerBlock {
4 border: 1px solid black; 4 border: 1px solid black;
5 -webkit-transition: all 1s linear; 5 -webkit-transition: all 1s linear;
6 -moz-transition: all 1s linear; 6 -moz-transition: all 1s linear;
7 } 7 }
8 8
9 .innerBlock { 9 .innerBlock {
10 background-color: green; 10 background-color: green;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 67
68 function runTest(expected) 68 function runTest(expected)
69 { 69 {
70 for (var i = 0; i < expected.length; ++i) { 70 for (var i = 0; i < expected.length; ++i) {
71 var time = expected[i][0]; 71 var time = expected[i][0];
72 var elementId = expected[i][1]; 72 var elementId = expected[i][1];
73 var property = expected[i][2]; 73 var property = expected[i][2];
74 var expectedValue = expected[i][3]; 74 var expectedValue = expected[i][3];
75 var dependsOn = expected[i][4]; 75 var dependsOn = expected[i][4];
76 if (window.internals) { 76 if (window.internals) {
77 internals.pauseTransitionAtTimeOnElement(property, time, document.ge tElementById(dependsOn)); 77 internals.pauseAnimations(time);
78 internals.pauseTransitionAtTimeOnElement(property, time, document.ge tElementById(elementId));
79 var actual = window.getComputedStyle(document.getElementById(element Id)).getPropertyCSSValue(property).getFloatValue(CSSPrimitiveValue.CSS_NUMBER); 78 var actual = window.getComputedStyle(document.getElementById(element Id)).getPropertyCSSValue(property).getFloatValue(CSSPrimitiveValue.CSS_NUMBER);
80 var result = document.getElementById("result"); 79 var result = document.getElementById("result");
81 if (actual == expectedValue) 80 if (actual == expectedValue)
82 result.innerHTML += 'PASS - "' + property + '" property for "' + elementId +'" element at ' + time + 's was: ' + actual + '<br/>'; 81 result.innerHTML += 'PASS - "' + property + '" property for "' + elementId +'" element at ' + time + 's was: ' + actual + '<br/>';
83 else 82 else
84 result.innerHTML += 'FAIL - "' + property + '" property for "' + elementId +'" element at ' + time + 's expected: ' + expectedValue + ' but saw: ' + actual + '<br/>'; 83 result.innerHTML += 'FAIL - "' + property + '" property for "' + elementId +'" element at ' + time + 's expected: ' + expectedValue + ' but saw: ' + actual + '<br/>';
85 } 84 }
86 } 85 }
87 if (window.testRunner) 86 if (window.testRunner)
88 testRunner.notifyDone(); 87 testRunner.notifyDone();
89 } 88 }
90 89
91 function loadListener() 90 function loadListener()
92 { 91 {
93 waitForAnimationStart(function(){runTest(expectedValues);}); 92 waitForAnimationStart(function(){runTest(expectedValues);});
94 } 93 }
95 94
96 for (var i = 0; i < transitioningElements.length; i++) { 95 for (var i = 0; i < transitioningElements.length; i++) {
97 var element = document.getElementById(transitioningElements[i]); 96 var element = document.getElementById(transitioningElements[i]);
98 element.className += " go"; 97 element.className += " go";
99 } 98 }
100 99
101 window.addEventListener("load", loadListener, false); 100 window.addEventListener("load", loadListener, false);
102 window.testRunner.waitUntilDone(); 101 window.testRunner.waitUntilDone();
103 102
104 </script> 103 </script>
OLDNEW
« no previous file with comments | « LayoutTests/animations/wrong-keyframe-name-expected.txt ('k') | LayoutTests/fast/css-generated-content/pseudo-animation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698