Backed out 5 changesets (bug 1694229) for geckoview failures. CLOSED TREE
[gecko.git] / testing / web-platform / tests / html / editing / dnd / platform / close-drag-001.html
blobfc8db3db7d73abed1dc2d0f4719baee840062896
1 <!doctype html>
2 <title>drag &amp; drop - closing a popup while a drag is in operation</title>
3 <style type="text/css">
4 p.gone, ul { display: none; }
5 p.gone + ul { display: block; }
6 </style>
7 <script type="text/javascript">
8 window.onload = function() {
9 if( location.href.match(/#popup$/) ) { document.getElementsByTagName('p')[0].className = 'gone'; }
10 document.getElementsByTagName('ul')[0].ondragstart = function(e) {
11 e.dataTransfer.effectAllowed = 'copy';
12 e.dataTransfer.setData('Text', 'dummy text');
13 setTimeout(function () { window.close(); },100);
16 </script>
17 <p><a href="javascript:alert('Click the link normally');" onclick="window.open('close-drag-001.html#popup','_blank');return false;">Open this page in a popup</a>.</p>
18 <ul draggable='true'>
19 <li>Drag this text downwards, and do not release the drag.</li>
20 <li>The browser may optionally cancel the drag. The browser may optionally close the popup. Fail if the drag placeholder gets stuck. Fail if the browser crashes. Fail if anything horrible happens. Fail if your pet kitten gets sick.</li>
21 <li>Release the drag.</li>
22 <li>Fail if the drag placeholder gets stuck. Fail if the browser crashes.</li>
23 </ul>
24 <noscript><p>Enable JavaScript and reload</p></noscript>