1 <title>Test that new transitions do not run while we are suspended</title>
8 background-color: blue;
9 -webkit-transition: left 0.1s;
18 internals.suspendAnimations(document);
24 internals.resumeAnimations(document);
27 function transitionEnded(event)
29 log("Transition ended on element with id: " + event.target.id);
32 function suspendAndContinue()
34 log("*** Suspending Animations/Transitions");
36 setTimeout(function() {
38 log("Transitions should be suspended: " + (window.internals.animationsAreSuspended(document) ? "PASS" : "FAIL"));
39 log("*** Setting left property to 200px. We should NOT see transition events.")
40 box.style.left = "200px";
41 setTimeout(function() {
47 function resumeAndContinue()
53 log("*** Resuming Animations/Transitions");
56 log("Transitions should not be suspended: " + (window.internals.animationsAreSuspended(document) ? "FAIL" : "PASS"));
58 resume(); // Just in case.
59 log("*** Test finished");
60 if (window.testRunner)
61 testRunner.notifyDone();
66 log("*** Starting test.")
68 box = document.getElementById("box");
69 document.addEventListener("webkitTransitionEnd", transitionEnded, false);
72 log("Transitions should not be suspended: " + (window.internals.animationsAreSuspended(document) ? "FAIL" : "PASS"));
74 setTimeout(function() {
75 log("*** Setting left property to 100px. We should see transition events.")
76 box.style.left = "100px";
77 setTimeout(function() {
85 var results = document.getElementById("results");
86 results.innerHTML = results.innerHTML + message + "<br>";
89 if (window.testRunner) {
90 testRunner.waitUntilDone();
91 testRunner.dumpAsText();
94 window.addEventListener("load", startTest, false);
97 <p>This test sets the left property on the box below. It will only have reproducible output when run in the test system</p>