OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <p>This test checks the object 'host.createShadowRoot()' and internals.shadowRoo
t(div) are the same.</p> | 7 <p>This test checks the object 'host.createShadowRoot()' and internals.shadowRoo
t(div) are the same.</p> |
8 <pre id="console"></pre> | 8 <pre id="console"></pre> |
9 | 9 |
10 <script> | 10 <script> |
11 function doTest() { | 11 function doTest() { |
12 if (!window.internals) { | 12 if (!window.internals) { |
13 debug('This test runs on DRT only'); | 13 debug('This test runs on DRT only'); |
14 return; | 14 return; |
15 } | 15 } |
16 | 16 |
17 div = document.createElement('div'); | 17 div = document.createElement('div'); |
18 // we should call webKitCreateShadowRoot first. | 18 // we should call webKitCreateShadowRoot first. |
19 root1 = div.createShadowRoot(); | 19 root1 = div.createShadowRoot(); |
20 root2 = internals.shadowRoot(div); | 20 root2 = internals.shadowRoot(div); |
21 | 21 |
22 shouldBe('root1', 'root2'); | 22 shouldBe('root1', 'root2'); |
23 } | 23 } |
24 | 24 |
25 doTest(); | 25 doTest(); |
26 var successfullyParsed = true; | 26 var successfullyParsed = true; |
27 </script> | 27 </script> |
28 </body> | 28 </body> |
29 </html> | 29 </html> |
OLD | NEW |