Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 <body> | |
| 7 <div id="host1"></div> | |
| 8 <div id="host2"></div> | |
| 9 <div id="host3"></div> | |
| 10 <div id="host4"></div> | |
| 11 </body> | |
| 12 <script> | |
| 13 if (window.testRunner) | |
| 14 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.
| |
| 15 | |
| 16 debug('Create open shadow root.'); | |
| 17 var host1 = document.querySelector('#host1'); | |
| 18 var root1 = host1.createShadowRoot({mode: 'open'}); | |
| 19 shouldBeNonNull(root1); | |
| 20 | |
| 21 debug('Create closed shadow root.'); | |
| 22 var host2 = document.querySelector('#host2'); | |
| 23 // TODO(kochi): Closed mode is not implemented yet. crbug.com/459136 | |
| 24 shouldThrow("host2.createShadowRoot({mode: 'closed'})"); | |
| 25 | |
| 26 debug('Create shadow root with empty parameter.'); | |
| 27 var host3 = document.querySelector('#host3'); | |
| 28 var root3 = host3.createShadowRoot({}); | |
| 29 shouldBeNonNull(root3); | |
| 30 | |
| 31 debug('Create shadow root whose mode is neither open nor closed.'); | |
| 32 var host4 = document.querySelector('#host4'); | |
| 33 shouldThrow("host4.createShadowRoot({mode: 'illegal'})"); | |
| 34 </script> | |
| 35 </html> | |
| OLD | NEW |