diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/target-origin/HELPER-mustallow.html')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/target-origin/HELPER-mustallow.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/target-origin/HELPER-mustallow.html b/testing/web-platform/tests/html/editing/dnd/target-origin/HELPER-mustallow.html new file mode 100644 index 0000000000..c0d3aa022c --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/target-origin/HELPER-mustallow.html @@ -0,0 +1,26 @@ +<!doctype html> +<html> + <head> + <title>Must be allowed</title> + <style type="text/css"> +html { background: blue; } +html, body { margin: 0; padding: 0; height: 100%; width: 100%; } + </style> + </head> + <body> + <script type="text/javascript"> +if( location.search && location.search.indexOf('domain') != -1 ) { + document.domain = location.hostname.replace(/^[^.]+\./,''); +} +var seentypes = {}; +document.body.ondragenter = document.body.ondragover = document.body.ondrop = function (e) { + e.preventDefault(); + if( e.type == 'drop' ) { + document.body.innerHTML = ( seentypes.dragenter && seentypes.dragover && e.dataTransfer.getData('text') == 'dummy text' ) ? 'PASS' : 'FAIL'; + } else { + seentypes[e.type] = true; + } +} + </script> + </body> +</html> |