| 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 debug('Create open shadow root.'); |
| 14 var host1 = document.querySelector('#host1'); |
| 15 var root1 = host1.createShadowRoot({mode: 'open'}); |
| 16 shouldBeNonNull(root1); |
| 17 |
| 18 debug('Create closed shadow root.'); |
| 19 var host2 = document.querySelector('#host2'); |
| 20 // TODO(kochi): Closed mode is not implemented yet. crbug.com/459136 |
| 21 shouldThrow("host2.createShadowRoot({mode: 'closed'})"); |
| 22 |
| 23 debug('Create shadow root with empty parameter.'); |
| 24 var host3 = document.querySelector('#host3'); |
| 25 var root3 = host3.createShadowRoot({}); |
| 26 shouldBeNonNull(root3); |
| 27 |
| 28 debug('Create shadow root whose mode is neither open nor closed.'); |
| 29 var host4 = document.querySelector('#host4'); |
| 30 shouldThrow("host4.createShadowRoot({mode: 'illegal'})"); |
| 31 </script> |
| 32 </html> |
| OLD | NEW |