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

Side by Side Diff: LayoutTests/fast/dom/shadow/style-scoped-not-enabled.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 <script>
6 if (window.internals)
7 window.internals.settings.setStyleScopedEnabled(false);
8 </script>
9 </head>
10 <body>
11 <div id="host"></div>
12 <span id='shouldNotBeApplied'>Should not be blue</span>
13 <div>
14 <style scoped> p { color: red; } </style>
15 <p id='insideScope'>Should be red</p>
16 </div>
17 <p id='shouldNotBeScoped'>Should be red</p>
18 <script>
19 description("This test ensures content element feature can be disabled");
20 var host = document.getElementById("host");
21 var shadow = host.createShadowRoot();
22 shadow.innerHTML = "<style> span { color: blue; } </style><span id='shouldBeAppl ied'>Should be blue</span>";
23 var shouldBeApplied = shadow.getElementById("shouldBeApplied");
24 var shouldNotBeApplied = document.getElementById("shouldNotBeApplied");
25 var shouldNotBeScoped = document.getElementById("shouldNotBeScoped");
26 var insideScope = document.getElementById("insideScope");
27 shouldBe("window.getComputedStyle(shouldBeApplied).color", "'rgb(0, 0, 255)'");
28 shouldBe("window.getComputedStyle(shouldNotBeApplied).color", "'rgb(0, 0, 0)'");
29 shouldBe("window.getComputedStyle(insideScope).color", "'rgb(255, 0, 0)'");
30 shouldBe("window.getComputedStyle(shouldNotBeScoped).color", "'rgb(255, 0, 0)'") ;
31 finishJSTest();
32 </script>
33 </body>
34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698