Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / input-element-display-none-in-dragleave-crash.html
blobbdd9a6c1bf111f9bd0b7dd13fd00f0ba43cf7df8
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 function test()
12 var dropTarget = document.getElementById("drop-target");
13 dropTarget.addEventListener("dragleave", function() {
14 dropTarget.style.display = "none";
15 }, false);
17 if (window.eventSender) {
18 eventSender.beginDragWithFiles(["resources/abe.png"]);
19 var x = dropTarget.offsetLeft + dropTarget.offsetWidth / 2;
20 var y = dropTarget.offsetTop + dropTarget.offsetHeight / 2;
21 eventSender.mouseMoveTo(x, y);
22 eventSender.mouseMoveTo(0, 0);
24 // The test harness wants us to call eventSender.mouseUp() before finishing,
25 // but we need to not navigate when that happens, so add a drop handler that
26 // prevents navigation.
27 window.addEventListener("dragover", function() {
28 event.preventDefault();
29 }, false);
30 window.addEventListener("drop", function() {
31 event.preventDefault();
32 }, false);
33 eventSender.mouseUp();
36 if (window.testRunner)
37 testRunner.notifyDone();
39 </script>
40 </head>
41 <body onload="test()">
42 <p>This test passes if there is no crash when dragging a file over and then away from the file input element below.</p>
43 <input type="file" id="drop-target">
44 </body>
45 </html>