Changeset 84961 in webkit
- Timestamp:
- Apr 26, 2011 2:49:10 PM (13 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 1 added
- 6 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84959 r84961 1 2011-04-26 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Daniel Bates. 4 5 Convert some transition tests to use the pause API, and more cleanup 6 https://bugs.webkit.org/show_bug.cgi?id=59490 7 8 * animations/animation-drt-api.html: 9 Fail message was the same as the pass message (doh!). 10 11 * platform/chromium-linux/transitions/transition-drt-api-expected.png: Removed. 12 * platform/chromium-win/transitions/transition-drt-api-expected.png: Removed. 13 * platform/chromium-win/transitions/transition-drt-api-expected.txt: Removed. 14 * platform/gtk/transitions/transition-drt-api-expected.txt: Removed. 15 * platform/mac/transitions/transition-drt-api-expected.png: Removed. 16 * platform/mac/transitions/transition-drt-api-expected.txt: Removed. 17 * transitions/transition-drt-api-expected.txt: Added. 18 * transitions/transition-drt-api.html: 19 Made into a text test. 20 * transitions/font-family-during-transition.html: 21 Use the pause API. 22 * transitions/transition-drt-api-delay.html: 23 General cleanup. 24 * transitions/bad-transition-shorthand-crash.html: 25 Shorten the test. 26 * transitions/border-radius-transition.html: 27 * transitions/default-timing-function.html: 28 * transitions/interrupt-zero-duration.html: 29 Remove style attribute 30 * transitions/color-transition-premultiplied.html: 31 * transitions/transition-timing-function-expected.txt: 32 * transitions/transition-timing-function.html: 33 Use pause API. 34 * transitions/inherit-other-props.html: 35 * transitions/transform-op-list-match.html: 36 Whitespace. 37 * transitions/opacity-transition-zindex.html: 38 Add FIXME. 39 * transitions/transition-shorthand-delay-expected.txt: 40 * transitions/transition-shorthand-delay.html: 41 * transitions/zero-duration-with-non-zero-delay-start-expected.txt: 42 * transitions/zero-duration-with-non-zero-delay-start.html: 43 Use runTransitionTest(). 44 1 45 2011-04-26 Maciej Stachowiak <mjs@apple.com> 2 46 -
trunk/LayoutTests/animations/animation-drt-api.html
r84873 r84961 39 39 result = "PASS: correctly paused animation"; 40 40 else 41 result = " PASS: correctly pausedanimation";41 result = "FAIL: failed to pause animation"; 42 42 43 43 document.getElementById('results').innerText = result; -
trunk/LayoutTests/transitions/bad-transition-shorthand-crash.html
r84875 r84961 21 21 function finish() 22 22 { 23 layoutTestController.notifyDone(); 23 if (window.layoutTestController) 24 layoutTestController.notifyDone(); 24 25 } 25 26 … … 28 29 var box = document.getElementById('box'); 29 30 box.style.webkitTransform = 'rotate(0)'; 30 setTimeout(finish, 100);31 setTimeout(finish, 20); 31 32 } 32 33 … … 35 36 var box = document.getElementById('box'); 36 37 box.style.webkitTransform = 'rotate(180deg)'; 37 setTimeout(returnToStart, 100);38 setTimeout(returnToStart, 20); 38 39 } 39 40 -
trunk/LayoutTests/transitions/border-radius-transition.html
r84875 r84961 31 31 </style> 32 32 <script src="resources/transition-test-helpers.js"></script> 33 <script type="text/javascript">33 <script> 34 34 35 35 const expectedValues = [ -
trunk/LayoutTests/transitions/color-transition-premultiplied.html
r84875 r84961 44 44 } 45 45 46 runTransitionTest(expectedValues, setupTest, true);46 runTransitionTest(expectedValues, setupTest, usePauseAPI); 47 47 </script> 48 48 </head> -
trunk/LayoutTests/transitions/default-timing-function.html
r84875 r84961 41 41 </style> 42 42 <script src="resources/transition-test-helpers.js"></script> 43 <script type="text/javascript">43 <script> 44 44 45 45 const expectedValues = [ -
trunk/LayoutTests/transitions/font-family-during-transition.html
r84874 r84961 47 47 } 48 48 49 runTransitionTest(expectedValues, setupTest, true);49 runTransitionTest(expectedValues, setupTest, usePauseAPI); 50 50 </script> 51 51 </head> -
trunk/LayoutTests/transitions/inherit-other-props.html
r84875 r84961 66 66 function testProperties() 67 67 { 68 69 68 var boxes = document.body.getElementsByClassName('box'); 70 69 for (var i = 0; i < boxes.length; ++i) { -
trunk/LayoutTests/transitions/interrupt-zero-duration.html
r84875 r84961 14 14 } 15 15 </style> 16 <script type="text/javascript" charset="utf-8">16 <script> 17 17 if (window.layoutTestController) { 18 18 layoutTestController.dumpAsText(); -
trunk/LayoutTests/transitions/opacity-transition-zindex.html
r84875 r84961 55 55 } 56 56 } 57 57 // FIXME: this should use runTransitionTest(). 58 58 window.addEventListener('load', runTest, false); 59 59 </script> -
trunk/LayoutTests/transitions/transform-op-list-match.html
r84875 r84961 35 35 36 36 runTransitionTest(expectedValues, setupTest, usePauseAPI); 37 38 37 </script> 39 38 </head> -
trunk/LayoutTests/transitions/transition-drt-api-delay.html
r84875 r84961 4 4 <head> 5 5 <style> 6 div{6 #target { 7 7 position: relative; 8 8 left: 100px; … … 16 16 } 17 17 18 .moved {18 #target.moved { 19 19 left: 200px; 20 20 } 21 21 </style> 22 22 <script src="resources/transition-test-helpers.js"></script> 23 <script type="text/javascript">23 <script> 24 24 function endTest() { 25 25 if (window.layoutTestController) { … … 54 54 </p> 55 55 56 <div id="target"> 57 </div> 56 <div id="target"></div> 58 57 59 <div id="result"> 60 </div> 58 <div id="result"></div> 61 59 62 60 </body> -
trunk/LayoutTests/transitions/transition-drt-api.html
r84875 r84961 4 4 <head> 5 5 <style> 6 body { 7 margin: 0; 8 } 9 10 div { 6 #target { 11 7 position: relative; 12 8 left: 100px; 13 height: 200px;14 width: 200px;15 background-color: red;9 height: 100px; 10 width: 100px; 11 background-color: blue; 16 12 -webkit-transition-property: left; 17 13 -webkit-transition-duration: 4s; … … 19 15 } 20 16 21 .moved {17 #target.moved { 22 18 left: 200px; 23 19 } 24 20 </style> 25 21 <script> 22 if (window.layoutTestController) 23 layoutTestController.dumpAsText(); 24 26 25 function endTest() { 27 26 if (window.layoutTestController) { 28 if (!layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target")) 29 throw("Transition is not running"); 30 27 var paused = layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 1.0, "target"); 28 var result = ""; 29 if (paused) 30 result = "PASS: correctly paused transition"; 31 else 32 result = "FAIL: failed to pause transition"; 33 34 document.getElementById('results').innerText = result; 31 35 layoutTestController.notifyDone(); 32 } 36 } else 37 document.getElementById('results').innerText = "This test requires DRT"; 33 38 } 34 39 … … 43 48 </head> 44 49 <body onload="startTest()"> 45 <h1>Test for DRT pauseTransitionAtTimeOnElementWithId() API</h1> 46 47 <div id="target"> 48 </div> 50 <!-- Test for DRT pauseTransitionAtTimeOnElementWithId() API --> 51 <div id="target"></div> 52 <div id="results"></div> 49 53 50 54 </body> -
trunk/LayoutTests/transitions/transition-shorthand-delay-expected.txt
r38957 r84961 1 Test for transition shorthand 1 PASS - "left" property for "target" element at 0.5s saw something close to: 125 2 2 3 This test works only in DumpRenderTree. It uses an API exposed only there to jump to a particular time in a running transition. Tests bug 212474 5 PASS -
trunk/LayoutTests/transitions/transition-shorthand-delay.html
r84875 r84961 4 4 <head> 5 5 <style> 6 body { 7 margin: 0; 8 } 9 10 div { 6 #target { 11 7 position: relative; 12 8 left: 100px; … … 14 10 width: 50px; 15 11 background-color: green; 16 -webkit-transition: left 4s linear 1s;12 -webkit-transition: left 1s linear 250ms; 17 13 } 18 14 19 .moved {15 #target.moved { 20 16 left: 200px; 21 17 } 22 18 </style> 23 19 <script src="resources/transition-test-helpers.js"></script> 24 <script type="text/javascript"> 25 function endTest() { 26 if (window.layoutTestController) { 27 layoutTestController.pauseTransitionAtTimeOnElementWithId("left", 2.0, "target"); 28 var left = window.getComputedStyle(document.getElementById('target')).left; 29 var result = "PASS"; 30 if (left != "125px") { 31 result = "FAIL - expected 125px got " + left; 32 } 33 document.getElementById('result').innerHTML = "<p>" + result + "</p>"; 34 layoutTestController.notifyDone(); 35 } 36 } 37 38 function startTest() { 39 if (window.layoutTestController) { 40 layoutTestController.dumpAsText(); 41 layoutTestController.waitUntilDone(); 42 } 43 44 document.getElementById("target").className = "moved"; 45 waitForAnimationStart(endTest, 1); 46 } 20 <script> 21 const expectedValues = [ 22 // [time, element-id, property, expected-value, tolerance] 23 [0.5, "target", "left", 125, 4], 24 ]; 25 26 function setupTest() 27 { 28 document.getElementById("target").className = "moved"; 29 } 30 31 // Pause API isn't happy pausing during delay yet. 32 // https://bugs.webkit.org/show_bug.cgi?id=59475 33 runTransitionTest(expectedValues, setupTest, dontUsePauseAPI); 47 34 </script> 48 35 </head> 49 <body onload="startTest()"> 50 <h1>Test for transition shorthand</h1> 51 52 <p>This test works only in DumpRenderTree. It uses an API exposed 53 only there to jump to a particular time in a running transition. 54 Tests bug <a href="https://bugs.webkit.org/show_bug.cgi?id=21247">21247</a> 55 </p> 56 57 <div id="target"> 58 </div> 59 60 <div id="result"> 61 </div> 36 <body> 37 <div id="target"></div> 38 <div id="result"></div> 62 39 63 40 </body> -
trunk/LayoutTests/transitions/transition-timing-function-expected.txt
r39384 r84961 1 box1: within 5% of 200: PASSED 2 box2: within 5% of 320: PASSED 3 box3: within 5% of 125: PASSED 4 box4: within 5% of 272: PASSED 5 box5: within 5% of 200: PASSED 1 PASS - "left" property for "box1" element at 0.5s saw something close to: 200 2 PASS - "left" property for "box2" element at 0.5s saw something close to: 322 3 PASS - "left" property for "box3" element at 0.5s saw something close to: 126 4 PASS - "left" property for "box4" element at 0.5s saw something close to: 273 5 PASS - "left" property for "box5" element at 0.5s saw something close to: 200 6 6 -
trunk/LayoutTests/transitions/transition-timing-function.html
r84875 r84961 9 9 margin: 10px; 10 10 background-color: blue; 11 -webkit-transition-duration: 5s; 12 -webkit-transition-timing-function: linear; 11 -webkit-transition: left 1s linear; 12 } 13 .animating > .box { 14 left: 400px; 13 15 } 14 16 </style> 17 <script src="resources/transition-test-helpers.js"></script> 15 18 <script> 16 if (window.layoutTestController) { 17 layoutTestController.dumpAsText(); 18 layoutTestController.waitUntilDone(); 19 } 20 21 var kExpecteds = { 22 'box1' : 200, 23 'box2' : 320, 24 'box3' : 125, 25 'box4' : 272, 26 'box5' : 200 19 const expectedValues = [ 20 // [time, element-id, property, expected-value, tolerance] 21 [0.5, "box1", "left", 200, 4], 22 [0.5, "box2", "left", 322, 4], 23 [0.5, "box3", "left", 126, 4], 24 [0.5, "box4", "left", 273, 4], 25 [0.5, "box5", "left", 200, 4], 26 ]; 27 28 function setupTest() 29 { 30 document.getElementById('container').className = 'animating'; 27 31 } 28 32 29 function measurePosition() 30 { 31 var boxes = document.body.getElementsByClassName('box'); 32 33 var result = ''; 34 for (var i = 0; i < boxes.length; ++i) 35 { 36 var curBox = boxes[i]; 37 var curLeft = parseInt(window.getComputedStyle(curBox).left); 38 39 var expected = kExpecteds[curBox.id]; 40 var passed = (Math.abs(curLeft - expected) / expected) < 0.05; 41 var thisResult; 42 if (passed) 43 thisResult = curBox.id + ': within 5% of ' + expected + ': PASSED'; 44 else 45 thisResult = curBox.id + ': expected ' + expected + ', got ' + curLeft + '; outside 5%: FAIL'; 46 47 result += thisResult + '<br>'; 48 } 49 50 document.body.removeChild(document.getElementById('container')); 51 52 document.getElementById('result').innerHTML = result; 53 54 if (window.layoutTestController) 55 layoutTestController.notifyDone(); 56 } 57 58 function startTransition() 59 { 60 var boxes = document.body.getElementsByClassName('box'); 61 for (var i = 0; i < boxes.length; ++i) 62 boxes[i].style.left = '400px'; 63 64 window.setTimeout(measurePosition, 2500); 65 } 66 window.addEventListener('load', startTransition, false); 33 runTransitionTest(expectedValues, setupTest, usePauseAPI); 67 34 </script> 68 35 </head> -
trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-start-expected.txt
r39711 r84961 1 Test that transitions with a zero-duration and but a non-zero delay effectively work 1 PASS - "left" property for "target" element at 1s saw something close to: 200 2 2 3 PASS - left property is 200px as expected -
trunk/LayoutTests/transitions/zero-duration-with-non-zero-delay-start.html
r84875 r84961 4 4 <head> 5 5 <style> 6 body {7 margin: 0;8 }9 10 6 #target { 11 7 position: relative; 12 8 top: 100px; 13 9 left: 100px; 14 width: 200px;15 height: 200px;16 background-color: red;10 width: 100px; 11 height: 100px; 12 background-color: blue; 17 13 -webkit-transition-property: left; 18 14 -webkit-transition-duration: 0s; … … 20 16 } 21 17 18 #target.moved { 19 left: 200px; 20 } 22 21 </style> 22 <script src="resources/transition-test-helpers.js"></script> 23 23 <script> 24 25 function finishTest() { 26 var expected = 200; 27 var current = parseInt(window.getComputedStyle(document.getElementById('target')).left); 28 if (current == expected) 29 document.getElementById('result').innerHTML = "PASS - left property is " + current + "px as expected"; 30 else 31 document.getElementById('result').innerHTML = "FAIL - left property is " + current + "px instead of " + expected + "px"; 24 const expectedValues = [ 25 // [time, element-id, property, expected-value, tolerance] 26 [1, "target", "left", 200, 4], 27 ]; 32 28 33 if (window.layoutTestController) 34 layoutTestController.notifyDone(); 29 function setupTest() 30 { 31 document.getElementById('target').className = 'moved'; 35 32 } 36 37 function runTest() { 38 window.setTimeout(finishTest, 1000); 39 } 40 41 function startTest() { 42 if (window.layoutTestController) { 43 layoutTestController.dumpAsText(); 44 layoutTestController.waitUntilDone(); 45 } 46 47 var target = document.getElementById('target'); 48 target.style.left = '200px'; 49 50 window.setTimeout(runTest, 0); 51 } 33 34 // Pause API isn't happy pausing during delay yet. 35 // https://bugs.webkit.org/show_bug.cgi?id=59475 36 runTransitionTest(expectedValues, setupTest, dontUsePauseAPI); 52 37 </script> 53 38 </head> 54 <body onload="startTest()"> 55 <h1>Test that transitions with a zero-duration and but a non-zero delay effectively work</h1> 39 <body> 56 40 57 <div id="target"> 58 </div> 59 60 <div id="result"> 61 </div> 41 <div id="target"></div> 42 <div id="result"></div> 62 43 63 44 </body>
Note: See TracChangeset
for help on using the changeset viewer.