diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/events/017.xhtml')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/events/017.xhtml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/events/017.xhtml b/testing/web-platform/tests/html/editing/dnd/events/017.xhtml new file mode 100644 index 0000000000..0a372b5337 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/events/017.xhtml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Text input selection drag and drop: events after dragenter is cancelled</title> +<script type="application/ecmascript"> +function selectText() + {document.querySelector('input').select()} +function start(event) + {event.preventDefault();} +function dragMe(event) + {say('FAIL (drag event should not fire if dragstart is cancelled)');} +function enterBody(event) + {event.preventDefault(); + say('FAIL (dragover event should not fire if dragstart is cancelled)');} +function overBody(event) + {event.preventDefault(); + say('FAIL (dragover event should not fire if dragstart is cancelled)');} +function dropIt(event) + {say('FAIL (drop event should not fire if dragstart is cancelled)');} +function say(it) + {document.querySelector('pre').appendChild(document.createTextNode(it + '\n'));} +</script> +</head> +<body onload="selectText()" ondragenter="enterBody(event)" ondragover="overBody(event)" ondrop="dropIt(event)"> +<p ondragstart="start(event)"><input value="Try to drag me" ondrag="dragMe(event)"/></p> +<p>You should not be able to drag text selection above.</p> +<pre/> +</body> +</html> |