| 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>
|
|
|