diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/crashers/dialog-001.html')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/crashers/dialog-001.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/crashers/dialog-001.html b/testing/web-platform/tests/html/editing/dnd/crashers/dialog-001.html new file mode 100644 index 0000000000..9ab62787b0 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/crashers/dialog-001.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<meta charset='utf-8'> +<title>drag & drop – crash when drag is interrupted by dialogs</title> +<style> + body > div { + height: 200px; + width: 200px; + background-color: orange; + position: absolute; + top: 8px; + left: 8px; + } + body > div * { + display: none; + } + body > div + div { + background-color: navy; + left: 250px; + } + p { + margin-top: 220px; + } +</style> + +<script> +window.onload = function() { + var doneonce = false; + document.getElementsByTagName('div')[0].ondragstart = function(e) { + alert( doneonce ? 'Dismiss this dialog. PASS if the browser does not crash.' : 'Dismiss this dialog. The browser should not crash. Without re-focusing the page first, try dragging the orange square a second time. If a second alert does not appear, release the drag, and then try dragging the orange square a third time.' ); + doneonce = true; + }; +}; +</script> + +<div draggable='true' itemscope></div><div></div> + +<p>Try to drag the orange square onto the blue square.</p> +<noscript><p>Enable JavaScript and reload</p></noscript> |