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

Side by Side Diff: LayoutTests/fast/css/getComputedStyle/getComputedStyle-with-before-element.html

Issue 572043002: Support getComputedStyle for non-rendered pseudo elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <style>
4 #t1::before { color: green }
5 #t2::before { display: none; content: "X"; color: green; }
6 #t3::before { display: none; color: green; }
7 #t4 { display: none; }
8 #t4::before { content: "X"; color: green; }
9 #t5 { display: none; }
10 #t5::before { color: green; }
11 #t6 { color: green; }
12 </style>
13 <div id="t1"></div>
14 <div id="t2"></div>
15 <div id="t3"></div>
16 <div id="t4"></div>
17 <div id="t5"></div>
18 <div id="t6"></div>
19 <script>
20 description("Check getComputedStyle for ::before with various combinations of di splay and content.");
21
22 var expectedDisplay = [
23 "'inline'",
24 "'none'",
25 "'none'",
26 "'inline'",
27 "'inline'",
28 "'inline'"
29 ];
30
31 for (var i=0; i<6; i++) {
32
33 var computed = getComputedStyle(document.getElementById("t"+(i+1)), "::befor e");
34
35 shouldBe("computed.color", "'rgb(0, 128, 0)'");
36 shouldBe("computed.display", expectedDisplay[i]);
37 }
38
39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698