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

Side by Side Diff: third_party/WebKit/LayoutTests/animations/interpolation/z-index-interpolation.html

Issue 1881333002: Use neutralKeyframe sentinal instead of '' for interpolation-test.js tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix composition test code Created 4 years, 8 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 <meta charset="UTF-8"> 2 <meta charset="UTF-8">
3 <style> 3 <style>
4 body { 4 body {
5 margin-top: 20px; 5 margin-top: 20px;
6 } 6 }
7 .layer-reference { 7 .layer-reference {
8 position: fixed; 8 position: fixed;
9 top: 0px; 9 top: 0px;
10 height: 100vh; 10 height: 100vh;
(...skipping 27 matching lines...) Expand all
38 var layerReference = document.createElement('div'); 38 var layerReference = document.createElement('div');
39 layerReference.classList.add('layer-reference'); 39 layerReference.classList.add('layer-reference');
40 layerReference.style.zIndex = zIndex; 40 layerReference.style.zIndex = zIndex;
41 layerReference.style.left = 7 + (i * 50) + 'px'; 41 layerReference.style.left = 7 + (i * 50) + 'px';
42 layerReference.textContent = 'Z=' + zIndex; 42 layerReference.textContent = 'Z=' + zIndex;
43 document.body.appendChild(layerReference); 43 document.body.appendChild(layerReference);
44 }); 44 });
45 45
46 assertInterpolation({ 46 assertInterpolation({
47 property: 'z-index', 47 property: 'z-index',
48 from: '', 48 from: neutralKeyframe,
49 to: '5', 49 to: '5',
50 }, [ 50 }, [
51 {at: -0.3, is: '-4'}, 51 {at: -0.3, is: '-4'},
52 {at: 0, is: '-2'}, 52 {at: 0, is: '-2'},
53 {at: 0.3, is: '0'}, 53 {at: 0.3, is: '0'},
54 {at: 0.6, is: '2'}, 54 {at: 0.6, is: '2'},
55 {at: 1, is: '5'}, 55 {at: 1, is: '5'},
56 {at: 1.5, is: '9'}, 56 {at: 1.5, is: '9'},
57 ]); 57 ]);
58 58
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 }); 126 });
127 127
128 afterTest(function() { 128 afterTest(function() {
129 if (window.testRunner) { 129 if (window.testRunner) {
130 [].forEach.call(document.querySelectorAll('.layer-reference'), function(elem ent) { 130 [].forEach.call(document.querySelectorAll('.layer-reference'), function(elem ent) {
131 element.remove(); 131 element.remove();
132 }); 132 });
133 } 133 }
134 }); 134 });
135 </script> 135 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698