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

Side by Side Diff: third_party/WebKit/LayoutTests/transitions/transition-end-event-window.html

Issue 2602163002: CSS Transitions: Reduce time taken by transition-end-event tests (Closed)
Patch Set: Created 3 years, 11 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 <html> 1 <html>
2 <head> 2 <head>
3 <style> 3 <style>
4 .box { 4 .box {
5 position: relative; 5 position: relative;
6 left: 0; 6 left: 0;
7 height: 100px; 7 height: 100px;
8 width: 100px; 8 width: 100px;
9 margin: 10px; 9 margin: 10px;
10 background-color: blue; 10 background-color: blue;
11 -webkit-transition-property: left; 11 -webkit-transition-property: left;
12 -webkit-transition-duration: 0.5s; 12 -webkit-transition-duration: 0.1s;
13 } 13 }
14 </style> 14 </style>
15 <script src="transition-end-event-helpers.js"></script> 15 <script src="transition-end-event-helpers.js"></script>
16 <script type="text/javascript"> 16 <script type="text/javascript">
17 17
18 var expectedEndEvents = [ 18 var expectedEndEvents = [
19 // [property-name, element-id, elapsed-time, listen] 19 // [property-name, element-id, elapsed-time, listen]
20 ["left", "box1", 0.5, false] 20 ["left", "box1", 0.1, false]
21 ]; 21 ];
22 22
23 function setupTest() 23 function setupTest()
24 { 24 {
25 window.onwebkittransitionend = recordTransitionEndEvent; 25 window.onwebkittransitionend = recordTransitionEndEvent;
26 26
27 var box = document.getElementById('box1'); 27 var box = document.getElementById('box1');
28 box.style.left = '200px'; 28 box.style.left = '200px';
29 } 29 }
30 30
31 runTransitionTest(expectedEndEvents, setupTest); 31 runTransitionTest(expectedEndEvents, setupTest);
32 </script> 32 </script>
33 </head> 33 </head>
34 <body> 34 <body>
35 35
36 <p>Initiating a 500ms transition on the left property of box1 and catching it on the window.</p> 36 <p>Initiating a 100ms transition on the left property of box1 and catching it on the window.</p>
37 37
38 <div id="container"> 38 <div id="container">
39 <div id="box1" class="box"></div> 39 <div id="box1" class="box"></div>
40 </div> 40 </div>
41 41
42 <div id="result"></div> 42 <div id="result"></div>
43 43
44 </body> 44 </body>
45 </html> 45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698