diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html b/testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html new file mode 100644 index 0000000000..f8a7daf022 --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/target-origin/008-manual.html @@ -0,0 +1,53 @@ +<!doctype html> +<html> + <head> + <title>Data URI does match *</title> + </head> + <body> + <!-- +* allows any URL at all, so it should work + --> + <p>Load the following URL in a new tab (copy & paste it into the address bar):</p> + <noscript><p>Enable JavaScript and reload</p></noscript> + + <script type="text/javascript"> +document.write('data:text/html,'+escape( +'<!doctype html>\ +<html>\ + <head>\ + <title>Data URI does match *<\/title>\ + <style type="text/css">\ +html, body { margin: 0; padding: 0; }\ +div { height: 100px; width: 100px; background: orange; }\ +iframe { border: none; height: 150px; width: 150px; }\ + <\/style>\ + <\/head>\ + <body>\ + <script type="text/javascript">\ +var seentypes = {};\ +if( self == top ) {\ + document.body.ondragenter = document.body.ondragover = document.body.ondrop = function (e) {\ + e.preventDefault();\ + if( e.type == "drop" ) {\ + document.body.innerHTML = ( seentypes.dragenter && seentypes.dragover ) ? "PASS" : "FAIL";\ + } else {\ + seentypes[e.type] = true;\ + }\ + };\ + document.write("<p>Drag the orange square below over this text, and release it. Fail if this text does not change.<\\\/p>");\ + document.write("<p><iframe src=\\""+location.href+"\\"><\\\/iframe><\\\/p>");\ +} else {\ + document.write("<div draggable=\\"true\\"><\\\/div>");\ + document.getElementsByTagName("div")[0].ondragstart = function (e) {\ + e.dataTransfer.effectAllowed = "copy";\ + e.dataTransfer.setData("text","dummy text");\ + e.dataTransfer.allowTargetOrigin("*");\ + };\ +}\ + <\/script>\ + <\/body>\ +<\/html>')); + + </script> + </body> +</html> |