diff options
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/file/prompt/008.html')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/file/prompt/008.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/file/prompt/008.html b/testing/web-platform/tests/html/editing/dnd/file/prompt/008.html new file mode 100644 index 000000000..ff07b78de --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/file/prompt/008.html @@ -0,0 +1,41 @@ +<!DOCTYPE html> +<title>drag & drop - file drop prompt for javascript URL with inherited origin</title> +<style> +iframe { border: none; height: 250px; width: 250px; } +</style> + +<script> +window.onload = function() { + if( location.protocol != 'http:' && location.protocol != 'https:' ) { + document.getElementsByTagName('p')[0].innerHTML = 'This test should be loaded over http or https.'; + return; + } + var url = "javascript:'"+escape( +'<!DOCTYPE html>\ +<title>drag & drop - file drop prompt for data URI with inherited origin<\/title>\ +<style>\ + body > div {\ + height: 200px;\ + width: 200px;\ + background-color: orange;\ + }\ +<\/style>\ +<script>\ +window.onload = function() {\ + var orange = document.getElementsByTagName("div")[0];\ + orange.ondragover = orange.ondragenter = orange.ondrop = function(e) {\ + e.preventDefault();\ + };\ +};\ +<\/script>\ +<div><\/div>' + +"'"); + var frame = document.createElement('iframe'); + frame.setAttribute('src',url); + document.body.appendChild(frame); + document.getElementsByTagName('span')[0].innerHTML = location.hostname; +}; +</script> + +<p>Drag a file from your desktop onto the orange square. A prompt should appear, correctly identifying the server name <span></span></p> +<noscript><p>Enable JavaScript and reload</p></noscript>
\ No newline at end of file |