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

Side by Side Diff: LayoutTests/fast/css/style-scoped/style-scoped-detach.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 type="text/javascript">
5 function log(msg)
6 {
7 document.getElementById('console').appendChild(document.createTextNo de(msg + '\n'));
8 }
9
10 function test(id)
11 {
12 var elem = document.getElementById(id);
13 log(id + ': ' + document.defaultView.getComputedStyle(elem, null).ge tPropertyValue('color'));
14 }
15
16 function testAll()
17 {
18 test('S1');
19 test('P1');
20 test('S2');
21 test('P2');
22 test('S3');
23 test('P3');
24 }
25
26 function runTests()
27 {
28 if (window.testRunner) {
29 testRunner.dumpAsText();
30 testRunner.waitUntilDone();
31 }
32
33 log('--- ORIGINAL ---');
34 testAll();
35
36 log('--- AFTER DETACHING <STYLE SCOPED> ---');
37 var divElem = document.getElementById('DIV');
38 var styleElem = document.getElementById('STYLE');
39 divElem.removeChild(styleElem);
40 setTimeout(function() {
41 testAll();
42 log('--- FINISHED ---');
43 if (window.testRunner)
44 testRunner.notifyDone();
45 }, 0);
46 }
47 </script>
48 <style type="text/css" scoped>
49 body { color: black; }
50 </style>
51 </head>
52 <body onload="runTests();">
53 <p>Test detaching a &lt;style scoped&gt; element</p>
54 <div>
55 <span id="S1">Text</span>
56 <p id="P1">Text</p>
57 </div>
58 <div id="DIV">
59 <style id="STYLE" type="text/css" scoped>
60 div { color: red; }
61 p { color: green; }
62 </style>
63 <span id="S2">Text</span>
64 <p id="P2">Text</p>
65 </div>
66 <div>
67 <span id="S3">Text</span>
68 <p id="P3">Text</p>
69 </div>
70 <pre id="console"></pre>
71 </body>
72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698