Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / shadow / selection-across-shadows.html
blob9914f09d404efeae8fe78e44e1e4a31871edfa13
1 <!DOCTYPE html>
2 <style>* { font-family: monospace; }</style>
3 <div id="host1">[<span id="one">One</span>]</div>
4 <div id="host2">[<span id="two">Two</span>]</div>
5 <script>
6 function doDrag(start, end) {
7 if (!window.eventSender)
8 return;
9 eventSender.mouseMoveTo(start.offsetLeft + (start.offsetWidth / 2), start.offsetTop + 3);
10 eventSender.mouseDown();
11 eventSender.mouseMoveTo(end.offsetLeft + (end.offsetWidth / 2), end.offsetTop + 3);
12 eventSender.mouseUp();
14 var host1 = document.querySelector('#host1');
15 host1.createShadowRoot().innerHTML = '[<content select="#one"></content>]';
16 var host2 = document.querySelector('#host2');
17 host2.createShadowRoot().innerHTML = '[<content select="#two"></content>]';
18 var one = document.querySelector('#one');
19 var two = document.querySelector('#two');
20 doDrag(two, one);
21 </script>