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

Side by Side Diff: LayoutTests/transitions/transition-drt-api-delay.html

Issue 15738009: Beat the transition tests with a sanity stick. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass presubmit. 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
(Empty)
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5 <style>
6 #target {
7 position: relative;
8 left: 100px;
9 height: 50px;
10 width: 50px;
11 background-color: green;
12 -webkit-transition-property: left;
13 -webkit-transition-duration: 4s;
14 -webkit-transition-timing-function: linear;
15 -webkit-transition-delay: 1s;
16 }
17
18 #target.moved {
19 left: 200px;
20 }
21 </style>
22 <script src="resources/transition-test-helpers.js"></script>
23 <script>
24 function endTest() {
25 if (window.testRunner) {
26 var target = document.getElementById('target');
27 internals.pauseAnimations(2);
28 var left = window.getComputedStyle(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 testRunner.notifyDone();
35 }
36 }
37
38 function startTest() {
39 if (window.testRunner) {
40 testRunner.dumpAsText();
41 testRunner.waitUntilDone();
42 }
43
44 document.getElementById("target").className = "moved";
45 waitForAnimationStart(endTest, 1);
46 }
47 </script>
48 </head>
49 <body onload="startTest()">
50 <h1>Test for transition delay on testRunner API</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=22368">22368</a>
55 </p>
56
57 <div id="target"></div>
58
59 <div id="result"></div>
60
61 </body>
62 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698