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

Unified Diff: LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html

Issue 1158163004: Add ShadowRootInit dictionary. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nit fix in layout test Created 5 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
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html
diff --git a/LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html b/LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html
new file mode 100644
index 0000000000000000000000000000000000000000..669457359b56d350eb43b8a1de9df5928c919dbd
--- /dev/null
+++ b/LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html
@@ -0,0 +1,32 @@
+<!doctype html>
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+</head>
+<body>
+ <div id="host1"></div>
+ <div id="host2"></div>
+ <div id="host3"></div>
+ <div id="host4"></div>
+</body>
+<script>
+debug('Create open shadow root.');
+var host1 = document.querySelector('#host1');
+var root1 = host1.createShadowRoot({mode: 'open'});
+shouldBeNonNull(root1);
+
+debug('Create closed shadow root.');
+var host2 = document.querySelector('#host2');
+// TODO(kochi): Closed mode is not implemented yet. crbug.com/459136
+shouldThrow("host2.createShadowRoot({mode: 'closed'})");
+
+debug('Create shadow root with empty parameter.');
+var host3 = document.querySelector('#host3');
+var root3 = host3.createShadowRoot({});
+shouldBeNonNull(root3);
+
+debug('Create shadow root whose mode is neither open nor closed.');
+var host4 = document.querySelector('#host4');
+shouldThrow("host4.createShadowRoot({mode: 'illegal'})");
+</script>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698