OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../resources/event-sender-util.js"></script> | 4 <script src="../resources/event-sender-util.js"></script> |
5 <script src="../../../resources/js-test.js"></script> | 5 <script src="../../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 | 8 |
9 <div id="host"></div> | 9 <div id="host"></div> |
10 <div id="blockHost"></div> | 10 <div id="blockHost"></div> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 nestedShadowRoot.appendChild(box22); | 45 nestedShadowRoot.appendChild(box22); |
46 nestedShadowRoot.appendChild(box23); | 46 nestedShadowRoot.appendChild(box23); |
47 | 47 |
48 shadowRoot.appendChild(nestedHost); | 48 shadowRoot.appendChild(nestedHost); |
49 | 49 |
50 var x12 = centerX(box12); | 50 var x12 = centerX(box12); |
51 var y12 = centerY(box12); | 51 var y12 = centerY(box12); |
52 var x22 = centerX(box22); | 52 var x22 = centerX(box22); |
53 var y22 = centerY(box22); | 53 var y22 = centerY(box22); |
54 | 54 |
| 55 shouldThrow('shadowRoot.elementFromPoint()'); |
| 56 shouldThrow('shadowRoot.elementFromPoint(0)'); |
| 57 |
55 shouldBe('shadowRoot.elementFromPoint(x12, y12)', 'box12'); | 58 shouldBe('shadowRoot.elementFromPoint(x12, y12)', 'box12'); |
56 shouldBe('nestedShadowRoot.elementFromPoint(x22, y22)', 'box22'); | 59 shouldBe('nestedShadowRoot.elementFromPoint(x22, y22)', 'box22'); |
57 | 60 |
58 shouldBe('shadowRoot.elementFromPoint(x22, y22)', 'nestedHost'); | 61 shouldBe('shadowRoot.elementFromPoint(x22, y22)', 'nestedHost'); |
59 shouldBe('document.elementFromPoint(x22, y22)', 'host'); | 62 shouldBe('document.elementFromPoint(x22, y22)', 'host'); |
60 | 63 |
61 var root3 = blockHost.createShadowRoot(); | 64 var root3 = blockHost.createShadowRoot(); |
62 root3.appendChild(document.createTextNode('text1')); | 65 root3.appendChild(document.createTextNode('text1')); |
63 var root4 = inlineBlockHost.createShadowRoot(); | 66 var root4 = inlineBlockHost.createShadowRoot(); |
64 root4.appendChild(document.createTextNode('text2')); | 67 root4.appendChild(document.createTextNode('text2')); |
65 shouldBeNull('root3.elementFromPoint(centerX(blockHost), centerY(blockHost))'); | 68 shouldBeNull('root3.elementFromPoint(centerX(blockHost), centerY(blockHost))'); |
66 shouldBe('document.elementFromPoint(centerX(blockHost), centerY(blockHost))', 'b
lockHost'); | 69 shouldBe('document.elementFromPoint(centerX(blockHost), centerY(blockHost))', 'b
lockHost'); |
67 shouldBeNull('root4.elementFromPoint(centerX(inlineBlockHost), centerY(inlineBlo
ckHost))'); | 70 shouldBeNull('root4.elementFromPoint(centerX(inlineBlockHost), centerY(inlineBlo
ckHost))'); |
68 shouldBe('document.elementFromPoint(centerX(inlineBlockHost), centerY(inlineBloc
kHost))', 'inlineBlockHost'); | 71 shouldBe('document.elementFromPoint(centerX(inlineBlockHost), centerY(inlineBloc
kHost))', 'inlineBlockHost'); |
69 shouldBe('document.elementFromPoint(centerX(submit), centerY(submit))', 'submit'
); | 72 shouldBe('document.elementFromPoint(centerX(submit), centerY(submit))', 'submit'
); |
70 </script> | 73 </script> |
71 | 74 |
72 </body> | 75 </body> |
73 </html> | 76 </html> |
OLD | NEW |