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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/invalidation/unresolved-pseudo.html

Issue 1461653002: Use invalidation sets for :unresolved. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/unresolved-pseudo-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 #sibling, #child { background-color: green }
5 custom-one:unresolved #child, custom-two:unresolved + #sibling { background-colo r: red }
6 </style>
7
8 <custom-one>
9 <div></div>
10 <div id="child"></div>
11 </custom-one>
12
13 <custom-two>
14 <div></div>
15 <div></div>
16 </custom-two>
17 <div id="sibling"></div>
18
19 <script>
20 description("Use invalidation sets for :unresolved pseudo class.")
21
22 var red = "rgb(255, 0, 0)";
23 var green = "rgb(0, 128, 0)";
24
25 // Initially :unresolved.
26 shouldBe("getComputedStyle(child).backgroundColor", "red");
27 shouldBe("getComputedStyle(sibling).backgroundColor", "red");
28
29 document.body.offsetTop; // force recalc
30
31 var CustomOne = document.registerElement("custom-one", { prototype: Object.creat e(HTMLElement.prototype) });
32 document.head.appendChild(new CustomOne());
33
34 if (window.internals)
35 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
36 shouldBe("getComputedStyle(child).backgroundColor", "green");
37
38 document.body.offsetTop; // force recalc
39
40 var CustomTwo = document.registerElement("custom-two", { prototype: Object.creat e(HTMLElement.prototype) });
41 document.head.appendChild(new CustomTwo());
42
43 if (window.internals)
44 shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "1");
45 shouldBe("getComputedStyle(sibling).backgroundColor", "green");
46
47 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css/invalidation/unresolved-pseudo-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698