Chromium Code Reviews| 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..9c77308c991a7ffeefb21db3840122cbc357a32b |
| --- /dev/null |
| +++ b/LayoutTests/fast/dom/shadow/create-shadow-root-with-parameter.html |
| @@ -0,0 +1,35 @@ |
| +<!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> |
| +if (window.testRunner) |
| + testRunner.dumpAsText(); |
|
tkent
2015/06/04 03:38:14
This is unnecessary. js-test.js does it.
kochi
2015/06/04 03:45:49
Removed.
|
| + |
| +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> |