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

Unified Diff: LayoutTests/fast/css/style-scoped/registering-shadowroot.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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css/style-scoped/registering-shadowroot.html
diff --git a/LayoutTests/fast/css/style-scoped/registering-shadowroot.html b/LayoutTests/fast/css/style-scoped/registering-shadowroot.html
deleted file mode 100644
index b1c54a79fb977f1e74b3d0daec79be18f1df94e1..0000000000000000000000000000000000000000
--- a/LayoutTests/fast/css/style-scoped/registering-shadowroot.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<html>
-<head>
- <script src="../../../resources/js-test.js"></script>
-</head>
-<body>
- <p>Test having a &lt;style scoped&gt; element as a direct child of a ShadowRoot.</p>
- <div id="host">
- </div>
- <div id="ref">
- </div>
-
- <div id="console"></div>
-
- <script>
- if (!window.internals)
- debug("windows.internals not found!");
- else if (!window.internals.numberOfScopedHTMLStyleChildren)
- debug("windows.internals.numberOfScopedHTMLStyleChildren not found!");
- else {
- var ref = document.getElementById('ref');
- var host = document.getElementById('host');
- var sr = host.createShadowRoot();
- var style = document.createElement('style');
- style.setAttribute('scoped', 'scoped');
-
- debug("--- Initial ---");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "0"); /* <style> out of document, scoped */
-
- debug("--- Attaching &lt;style scoped&gt; ---");
- sr.appendChild(style);
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "1"); /* <style> in shadow, scoped */
-
- debug("--- Removing host ---");
- host.parentNode.removeChild(host);
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "0"); /* <style> out of document, scoped */
-
- debug("--- Inserting host ---");
- ref.parentNode.insertBefore(host, ref);
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "1"); /* <style> in shadow, scoped */
-
- debug("--- Unsetting @scoped ---");
- style.scoped = false;
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "1"); /* <style> in shadow, not scoped */
-
- debug("--- Setting @scoped ---");
- style.scoped = true;
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "1"); /* <style> in shadow, scoped */
-
- debug("--- Detaching &lt;style scoped&gt; ---");
- sr.removeChild(style);
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "0");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "0"); /* <style> out of document, scoped */
-
- debug("--- Attaching &lt;style scoped&gt; under host ---");
- host.appendChild(style);
- shouldBe("internals.numberOfScopedHTMLStyleChildren(host)", "1");
- shouldBe("internals.numberOfScopedHTMLStyleChildren(sr)", "0"); /* <style> in tree, scoped */
-
- debug("--- DONE ---");
- }
- var successfullyParsed = true;
- </script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698