summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/platform/close-drag-002-manual.html
blob: 35e8a5a5370f470834d3ad3a3aa8a0092a0063c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!doctype html>
<title>drag &amp; drop - closing the only window while a drag is in operation</title>
<style type="text/css">
p.gone, ul { display: none; }
p.gone + ul { display: block; }
</style>
<script type="text/javascript">
window.onload = function() {
  if( location.href.match(/#popup$/) ) { document.getElementsByTagName('p')[0].className = 'gone'; }
  document.getElementsByTagName('ul')[0].ondragstart = function(e) {
    e.dataTransfer.effectAllowed = 'copy';
    e.dataTransfer.setData('Text', 'dummy text');
    setTimeout(function () { window.close(); },100);
  };
};
</script>
<p><a href="javascript:alert('Click the link normally');" onclick="window.open('close-drag-002.html#popup','_blank');return false;">Open this page in a popup</a>.</p>
<ul draggable='true'>
  <li>Close all pages/browser windows except the popup.</li>
  <li>Drag this text downwards, and do not release the drag.</li>
  <li>The browser may optionally cancel the drag. The browser may optionally close the popup/window. Fail if the drag placeholder gets stuck. Fail if the browser crashes. Fail if anything horrible happens. Fail if zombie Michael Jackson resurects.</li>
  <li>Release the drag.</li>
  <li>Fail if the drag placeholder gets stuck. Fail if the browser crashes.</li>
</ul>
<noscript><p>Enable JavaScript and reload</p></noscript>