summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/editing/dnd/events/019.xhtml
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/events/019.xhtml')
-rw-r--r--testing/web-platform/tests/html/editing/dnd/events/019.xhtml21
1 files changed, 21 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/events/019.xhtml b/testing/web-platform/tests/html/editing/dnd/events/019.xhtml
new file mode 100644
index 000000000..3c4928fc2
--- /dev/null
+++ b/testing/web-platform/tests/html/editing/dnd/events/019.xhtml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Selection drag and drop: events after drag is cancelled</title>
+<script type="application/ecmascript">
+function selectText()
+ {window.getSelection().selectAllChildren(document.querySelector('p'))}
+function dragMe(event)
+ {event.preventDefault();}
+function dropIt(event)
+ {say('FAIL (no drop should occur after drag is cancelled)')}
+function say(it)
+ {document.querySelector('pre').appendChild(document.createTextNode(it + '\n'));}
+</script>
+</head>
+<body onload="selectText()" dropzone="copy string:text/plain" ondrop="dropIt(event)">
+<p ondrag="dragMe(event)">Try to drag me</p>
+<p>You should not be able to drop text selection above.</p>
+<pre/>
+</body>
+</html> \ No newline at end of file