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

Side by Side Diff: LayoutTests/fast/css/style-scoped/style-scoped-scoping-nodes-different-order.html

Issue 325663003: Remove scoped styles (retry) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout test (and expectation) Created 6 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
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="insert"></div>
8 <div>
9 <div>
10 <style scoped>
11 span {
12 color: grey;
13 }
14 </style>
15 <span id="target"></span>
16 </div>
17 <style scoped>
18 span {
19 border: 1px solid green;
20 }
21 </style>
22 </div>
23 <pre id='console'></pre>
24 <script>
25 var style = document.createElement('style');
26 style.innerHTML = 'span { color: green; }';
27 document.getElementById('insert').appendChild(style);
28
29 function borderColor(id) {
30 return getComputedStyle(document.getElementById(id)).borderColor;
31 }
32
33 description('Test a case whether order of scoping nodes is different from or der of style elements.');
34 shouldBe('document.styleSheets.length', '4');
35 shouldBe('document.styleSheets[1].cssRules[0].cssText', '"span { color: gree n; }"');
36 shouldBe('document.styleSheets[2].cssRules[0].cssText', '"span { color: grey ; }"');
37 shouldBe('document.styleSheets[3].cssRules[0].cssText', '"span { border: 1px solid green; }"');
38 shouldBe('borderColor("target")', '"rgb(0, 128, 0)"');
39 </script>
40 </body>
41 </html>
42
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698