Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326

This commit is contained in:
Josh Matthews 2017-10-12 09:25:50 -04:00
parent 462c272380
commit 1f531f66ea
5377 changed files with 174916 additions and 84369 deletions

View file

@ -4,25 +4,25 @@
<title>Removing canvas element during drag and drop</title>
<style type="text/css">
div
{height:100px;
width:100px;
padding:20px;
background-color:silver;}
{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);}
{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);}
{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>
<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)"/>
@ -30,14 +30,14 @@ function start(event)
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();}
{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>
</html>

View file

@ -4,16 +4,16 @@
<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;}
{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);}
{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>
@ -21,4 +21,4 @@ function addImage(event)
<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>
</html>

View file

@ -4,16 +4,16 @@
<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;}
{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);}
{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>
@ -21,4 +21,4 @@ function addImage(event)
<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>
</html>

View file

@ -4,11 +4,11 @@
<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;}
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body onload="document.querySelector('input').select()">
@ -16,4 +16,4 @@ div
<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>
</html>

View file

@ -4,11 +4,11 @@
<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;}
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body onload="window.getSelection().selectAllChildren(document.querySelector('span'))">
@ -16,4 +16,4 @@ div
<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>
</html>

View file

@ -4,11 +4,11 @@
<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;}
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body>
@ -16,4 +16,4 @@ div
<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>
</html>

View file

@ -4,25 +4,25 @@
<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;}
{width:40px;
height:40px;
margin-top:20px;
padding:40px;
color:white;
background-color:gray;}
p + div
{background-color:navy;}
{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'))"
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')))"
ondragover="return false"
ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/plain')))"
/>
</body>
</html>
</html>

View file

@ -4,25 +4,25 @@
<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;}
{width:40px;
height:40px;
margin-top:20px;
padding:40px;
color:white;
background-color:gray;}
p + div
{background-color:navy;}
{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'))"
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)))"
ondragover="return false"
ondrop="document.querySelector('div').appendChild(document.createTextNode(event.dataTransfer.getData('text/uri-list').substr(16,4)))"
/>
</body>
</html>
</html>

View file

@ -4,13 +4,13 @@
<title>Changing iframe content during drag and drop of link</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Changing object content during drag and drop of link</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<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;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<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;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Changing iframe content during drag and drop of selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Changing object content during drag and drop of selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Removing iframe during drag and drop of link</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Removing object during drag and drop of link</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<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;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<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;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Removing iframe during drag and drop of selection</title>
<style type="text/css">
iframe
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,13 +4,13 @@
<title>Removing object during drag and drop of selection</title>
<style type="text/css">
object
{height:100px;
width:300px;
border:solid medium navy;}
{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>
</html>

View file

@ -4,11 +4,11 @@
<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;}
{min-height:100px;
width:100px;
padding:20px;
color:white;
background-color:navy;}
</style>
</head>
<body>
@ -16,4 +16,4 @@ div
<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>
</html>

View file

@ -11,18 +11,18 @@
</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);
};
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>
<noscript><p>Enable JavaScript and reload</p></noscript>