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

Side by Side Diff: LayoutTests/animations/display-none-cancel-computedstyle.html

Issue 1156213003: Cancel animations before calling ContainerNode::attach in Element::attach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add a test. Created 5 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/animations/display-none-cancel-computedstyle-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../resources/js-test.js"></script>
3 <style>
4 #child {
5 width: 50px;
6 height: 50px;
7 background: red;
8 border: 1px solid red;
9 }
10
11 .animate {
12 animation: flash 0.2s infinite;
13 }
14
15 @keyframes flash {
16 0% {
17 opacity: 1;
18 }
19 100% {
20 opacity: 0;
21 }
22 }
23 </style>
24 <div id="container">
25 <div id="child"></div>
26 </div>
27 <script>
28 description("Canceling an animation should not leave dirty bits on display none elements.");
29
30 window.jsTestIsAsync = true;
31 if (window.testRunner) {
32 testRunner.waitUntilDone();
33 testRunner.dumpAsText();
34 }
35
36 var child = document.getElementById("child");
37 var container = document.getElementById("container");
38
39 child.addEventListener("animationstart", function(event) {
40 container.style.display = "none";
41 child.style.borderWidth = "10px";
42 shouldBeEqualToString("getComputedStyle(child).borderWidth", "10px");
43 child.style.borderWidth = "5px";
44 shouldBeEqualToString("getComputedStyle(child).borderWidth", "5px");
45 finishJSTest();
46 });
47
48 child.classList.add("animate");
49 </script>
50
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/animations/display-none-cancel-computedstyle-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698