Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255

This commit is contained in:
James Graham 2015-03-27 09:15:38 +00:00
parent b2a5225831
commit 1a81b18b9f
12321 changed files with 544385 additions and 6 deletions

View file

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing canvas element during drag and drop</title>
<style type="text/css">
div
{height:100px;
width:100px;
padding:20px;
background-color:silver;}
</style>
<script type="application/ecmascript">
function addImage(event)
{var c = document.createElement('img');
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
document.querySelector('div').appendChild(c);}
function start(event)
{event.dataTransfer.effectAllowed = 'copy';
event.dataTransfer.setData('text/uri-list', document.querySelector('canvas').toDataURL('image/png'));
document.querySelector('p').removeChild(canvas);}
</script>
</head>
<body>
<p>
<canvas width="100" height="100" draggable="true" ondragstart="start(event)">Canvas</canvas>
</p>
<p>Drag canvas pattern to the silver box below and drop it. It should be copied to the box once you drop it there.</p>
<div ondragover="return false" ondrop="addImage(event)"/>
<script type="application/ecmascript">
var canvas = document.querySelector('canvas'),
c = canvas.getContext('2d');
for(var x = 0; x != 50; x++)
{c.fillStyle = (x%2 == 0)?'navy':'white';
c.beginPath();
c.moveTo(x,x);
c.lineTo(100-x,x);
c.lineTo(100-x,100-x);
c.lineTo(x,100-x);
c.closePath();
c.fill();}
</script>
</body>
</html>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing image element during drag and drop of PNG image</title>
<style type="text/css">
div
{height:100px;
width:100px;
padding:20px;
background-color:silver;}
</style>
<script type="application/ecmascript">
function addImage(event)
{var c = document.createElement('img');
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
document.querySelector('div').appendChild(c);}
</script>
</head>
<body>
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';document.querySelector('p').removeChild(document.querySelector('img'))" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAEq0lEQVR42u1dvU4bQRAeR0RCCilSp0peIoKGB4DSXYRDlcZlFClKBI4bB/kV/AymIDwCTahiicaioEOxhCsjWVTJziyKMfYZn+9ud3bvG2mEZB13u9+nndmf2Rki7fKFXtEBbVKD9o22jB4bPaND6hm9Mjo0enevw/vfevKMfbYl/8vv4HdBUkvFALhltG2A7dN3+pur8jv53fwN/hZkjjRo3eiuAatjdJA7CcnkDOSb/G1uQ6mFzUeDagaQrvl764yEJOU22LbUymXaGrRhOt40OvJOQvLIGUkbP9GLeIn4SM9NJ+tOTVI+Jq0ubY9sVFRNxy6DIWKWmEvpQ/ByQNumI+fBEjHrZ86lT8HJV3ptGn8aDRGzxJxKHwMZFe9Mg6+jJWNCyrX0VbUc0nuj4+jJmPiWsfRZodN+ZvSoNETMjpYjwUCFfKaXpjEnpSVjQsqJYOF5ZLw1elF6MiakXAgmnpw378DegIgZUm4EGw8jA2QsIuUbvXHpM2CmljFfhfsUO5uCA0/j6AudfZV5arv6WuVHcYs+ALwqKTkvHnmLoEwr8CJW9Llts9iNwvj3plzsfeWyIRnzrq37kfIzq6naBpA5a6bzlJgOl/SMkl+rklEFgIX5k5THwTYgIdwzcP2jhM/o19KsOeoArnBS6suaqo2gQnXCJWSwXNwXB4gBMFekNBeTwSGUmiMK4yNktDhsleNaAZRrUvYWmasuQHJOSDdpdKyriEIvo9maexWC70gAIF/bKTvzzFUH4HgbJZ3HdFSw9vC6lfKHpq7X8X07AOOblK2HhLQBindC2g/9Rx+gePcj/cnqHIDoUFm1c9gjwNAy/d0kyXIAMLSYrQ8kqScAhhbH3iLJBwIwtBByTJKkBWBoIeSMJHMOwNBCyG+SdEYAQ4tTvyLJMQUwtBAyJEn8BTC0EHIHQhQSApOlzGTBqaty6jzVAhhaCOlhYahuYYitE02EHGNzURchLZItX4ChhZB9HFBpUjmgwhGuHv0feI0gBw1T3j7CgHT5jzYC5XQRsjUdSsrhjADGl7ka0EylBgRb+ySkMy9rww7A8Waududf2MH9Qh9k3CbXLsGVNh/mqrvojuEeQHI+Qmq4Fq1ndIyeruaDxAEuCWk+ncmB0z3gepubtQenMUHyGTWELJl8xk6B15CeqVAyLtPXtUICsyJnVivWs+J0dAAwbzLOkQRTk2YuKsapTQFkXqPjlDILEinnRcZ1fpXdkGo866xqnH9FNyTjz0JIQZXcuPQCAE5rqo6oMEFBl7RknBRfTg8lj5Yl48JdGT0ueIWiYIvIuHFfPg9l85LJcF42b+JTUFjysZnyVlhy2qfA0asovTo9+0JxYnWC8t0KBQXuFYrdkIy3mBj3LbeNQrejZTuqOlbcl8znGTqcfjXoM3pboqgaPhEPxda1qgcVYsRt5TanDkgISWzcV1N1hCS3jdu4dNxUDMIhlBzXysHGGspkcBtsW2pPh3fGLrZ2ya5cXHFp0qxJ6si3E68EQCpy344vQRZxO5jfye+2d/oqgHsV02Z3lvcl9QTnA+EkLZw5h9MZcY4pTvxldXj/W0+esc+25H/5HQGYon+Q5f+MwFz+8QAAAABJRU5ErkJggg==" alt="PNG circle"/></p>
<p>Drag green circle to the silver box below and drop it. It should be copied to the box once you drop it there.</p>
<div ondragover="return false" ondrop="addImage(event)"/>
</body>
</html>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing image element during drag and drop of SVG image</title>
<style type="text/css">
div
{height:100px;
width:100px;
padding:20px;
background-color:silver;}
</style>
<script type="application/ecmascript">
function addImage(event)
{var c = document.createElement('img');
c.setAttribute('src',event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,''));
document.querySelector('div').appendChild(c);}
</script>
</head>
<body>
<p><img ondragstart="event.dataTransfer.effectAllowed = 'copy';document.querySelector('p').removeChild(document.querySelector('img'))" src="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20version%3D%221.1%22%20width%3D%22100px%22%20height%3D%22100px%22%20viewBox%3D%220%200%20100%20100%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22green%22/%3E%3C/svg%3E" alt="SVG circle"/></p>
<p>Drag green circle to the silver box below and drop it. It should be copied to the box once you drop it there.</p>
<div ondragover="return false" ondrop="addImage(event)"/>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing input element during drag and drop of selection</title>
<style type="text/css">
div
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body onload="document.querySelector('input').select()">
<p><input value="Drag me" ondragstart="document.querySelector('p').removeChild(document.querySelector('input'))"/></p>
<p>Drag selection above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
<div ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'))"/>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing span element during drag and drop of selection</title>
<style type="text/css">
div
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body onload="window.getSelection().selectAllChildren(document.querySelector('span'))">
<p><span ondragstart="document.querySelector('p').removeChild(document.querySelector('span'))">Drag me</span></p>
<p>Drag selection above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
<div ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'))"/>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing a element during drag and drop of link</title>
<style type="text/css">
div
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body>
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';document.querySelector('p').removeChild(document.querySelector('a'))">Drag me</a></p>
<p>Drag link above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
<div ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'))"/>
</body>
</html>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing div element during drag and drop with text/plain data</title>
<style type="text/css">
div
{width:40px;
height:40px;
margin-top:20px;
padding:40px;
color:white;
background-color:gray;}
p + div
{background-color:navy;}
</style>
</head>
<body>
<div
draggable="true"
ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/plain','PASS');document.querySelector('body').removeChild(document.querySelector('div'))"
/>
<p>Drag gray box above to the navy box below and drop it. You should see word PASS once you drop it.</p>
<div
ondragover="return false"
ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))"
/>
</body>
</html>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing div element during drag and drop with text/uri-list data</title>
<style type="text/css">
div
{width:40px;
height:40px;
margin-top:20px;
padding:40px;
color:white;
background-color:gray;}
p + div
{background-color:navy;}
</style>
</head>
<body>
<div
draggable="true"
ondragstart="event.dataTransfer.effectAllowed = 'copy';event.dataTransfer.setData('text/uri-list','data:text/plain,PASS');document.querySelector('body').removeChild(document.querySelector('div'))"
/>
<p>Drag gray box above to the navy box below and drop it. You should see word PASS once you drop it.</p>
<div
ondragover="return false"
ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/uri-list').substr(16,4)))"
/>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing iframe content during drag and drop of link</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('iframe').src = 'data:text/plain,Drop%20link%20outside%20this%20frame'" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'">
<iframe src="helper-drag-me-link.xhtml">XHTML document</iframe>
<p>Drag link above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing object content during drag and drop of link</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('object').setAttribute('data','data:text/plain,Drop%20link%20outside%20this%20frame')" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-link.xhtml">XHTML document</object>
<p>Drag link above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing iframe content during drag and drop of text input selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('iframe').src = 'data:text/plain,Drop%20selection%20outside%20this%20frame'" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<iframe src="helper-drag-me-input.xhtml">XHTML document</iframe>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing object content during drag and drop of text input selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('object').setAttribute('data','data:text/plain,Drop%20selection%20outside%20this%20frame')" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-input.xhtml">XHTML document</object>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing iframe content during drag and drop of selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('iframe').src = 'data:text/plain,Drop%20selection%20outside%20this%20frame'" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<iframe src="helper-drag-me-p.xhtml">XHTML document</iframe>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Changing object content during drag and drop of selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('object').setAttribute('data','data:text/plain,Drop%20selection%20outside%20this%20frame')" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-p.xhtml">XHTML document</object>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing iframe during drag and drop of link</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('iframe'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'">
<iframe src="helper-drag-me-link.xhtml">XHTML document</iframe>
<p>Drag link above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing object during drag and drop of link</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('object'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/uri-list').replace(/\r\n$/,'') == 'data:text/plain,1')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-link.xhtml">XHTML document</object>
<p>Drag link above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing iframe during drag and drop of text input selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('iframe'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<iframe src="helper-drag-me-input.xhtml">XHTML document</iframe>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing object during drag and drop of text input selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('object'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-input.xhtml">XHTML document</object>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing iframe during drag and drop of selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('iframe'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<iframe src="helper-drag-me-p.xhtml">XHTML document</iframe>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing object during drag and drop of selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
</style>
</head>
<body ondragenter="event.preventDefault();document.querySelector('body').removeChild(document.querySelector('object'))" ondragover="return false" ondrop="document.querySelector('p').firstChild.nodeValue = (event.dataTransfer.getData('text/plain') == 'Drag me')?'PASS':'FAIL'">
<object type="application/xhtml+xml" data="helper-drag-me-p.xhtml">XHTML document</object>
<p>Drag selection above out of frame and drop it somewhere on the page. You should see word PASS once you drop it.</p>
</body>
</html>

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Removing a element during drag and drop of url</title>
<style type="text/css">
div
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body>
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy';document.querySelector('p').removeChild(document.querySelector('a'))">Drag me</a></p>
<p>Drag selection above to the navy box below and drop it. You should see word PASS once you drop it in the box.</p>
<div ondragenter="event.preventDefault()" ondragover="return false" ondrop="document.querySelector('div').appendChild(document.createTextNode((event.dataTransfer.getData('url') == 'data:text/plain,1')?'PASS':'FAIL'))"/>
</body>
</html>

View file

@ -0,0 +1,26 @@
<!doctype html>
<title>Removing drop targetted document before the queue is processed</title>
<style>
html, body, div {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
background-color: blue;
}
</style>
<script type="text/javascript">
window.onload = function () {
var blue = document.getElementsByTagName('div')[0];
blue.ondragenter = blue.ondragover = blue.ondrop = function (e) {
e.preventDefault();
};
window.addEventListener('message',function (){
var xhr = new XMLHttpRequest();
xhr.open('GET','/common/blank.html?pipe=trickle(d5)',false);
xhr.send(null); //should not end within the lifetime of this document
},false);
};
</script>
<div></div>
<noscript><p>Enable JavaScript and reload</p></noscript>

View file

@ -0,0 +1,28 @@
<!doctype html>
<title>Removing drop targetted document before the queue is processed</title>
<style>
span, iframe {
height: 200px;
width: 200px;
background-color: orange;
display: inline-block;
border: none;
}
</style>
<script type="text/javascript">
window.onload = function () {
var orange = document.getElementsByTagName('span')[0];
orange.ondragstart = function (e) {
e.dataTransfer.setData('text','dummy text');
e.dataTransfer.effectAllowed = 'all';
document.getElementsByTagName('iframe')[0].contentWindow.postMessage('dummy message','*');
setTimeout(function () {
document.getElementsByTagName('p')[0].removeChild(document.getElementsByTagName('iframe')[0]);
},4000);
};
};
</script>
<p><span draggable="true"></span> <iframe height="200" width="200" src="022-1.html"></iframe></p>
<p>Drag the orange square over the blue square, then release it. Wait 5 seconds for the blue square to disappear. Pass if you can select this text.</li>
<noscript><p>Enable JavaScript and reload</p></noscript>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Selection drag and drop: helper file</title>
</head>
<body onload="document.querySelector('input').select()">
<p><input value="Drag me"/></p>
</body>
</html>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Link drag and drop: helper file</title>
</head>
<body>
<p><a href="data:text/plain,1" ondragstart="event.dataTransfer.effectAllowed = 'copy'">Drag me</a></p>
</body>
</html>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Selection drag and drop: helper file</title>
</head>
<body onload="window.getSelection().selectAllChildren(document.querySelector('p'))">
<p>Drag me</p>
</body>
</html>