Update web-platform-tests to revision 3589b85af366d5c53bf03cfeb5e0ccb3ac2a38e9

This commit is contained in:
WPT Sync Bot 2018-04-01 21:18:21 -04:00
parent 1e2411d2c5
commit a57e1a4320
11 changed files with 274 additions and 7 deletions

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>DataTransferItem Test: types - files</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-types"/>
<meta name="flags" content="interact">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<p><div id="div" style="border: 2px green solid; width: 200px; height: 200px;"></div></p>
<h2>Test steps:</h2>
<p>Drag a file enter the green box, then drop file out</p>
<script>
let div = document.getElementById("div");
setup({explicit_done: true});
setup({explicit_timeout: true});
on_event(div, "dragenter", evt => {
let type = evt.dataTransfer.types[0];
test(() => {
assert_equals(type, "Files");
}, "Check if one of the types will be the string 'Files' when drag a file");
done();
});
</script>