Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / drop-handler-should-not-stop-navigate.html
blobfb6f3424bc6a3f247e1784651bec0287a5b2f67d
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <div>This tests that a drop handler's default action must be prevented in order to stop navigation.
5 Otherwise, if event.preventDefault() is not called, navigation should occur. To test manually,
6 simply drag and drop another link or HTML file on this page. If navigation occurs, then the test
7 passed.</div>
8 <script>
9 function log(text)
11 document.body.appendChild(document.createElement('br'));
12 document.body.appendChild(document.createElement('div').appendChild(document.createTextNode(text)));
14 window.addEventListener('beforeunload', function (e)
16 log('PASS');
17 testRunner.notifyDone();
18 e.preventDefault();
19 });
20 document.body.addEventListener('dragenter', function (event)
22 event.preventDefault();
23 });
24 document.body.addEventListener('dragover', function (event)
26 event.preventDefault();
27 });
28 document.body.addEventListener('drop', function (event)
30 log('Not preventing default event on drop.');
31 });
32 (function ()
34 if (!window.testRunner)
35 return;
36 testRunner.dumpAsText();
37 testRunner.waitUntilDone();
38 log('Starting test');
39 eventSender.beginDragWithFiles(['DRTFakeFile']);
40 eventSender.mouseMoveTo(document.body.offsetLeft + 10, document.body.offsetTop + 10);
41 eventSender.mouseUp();
42 window.setTimeout(function ()
44 // Deadman's switch so we don't need to wait for the test to timeout to fail.
45 testRunner.notifyDone();
46 }, 0);
47 })();
48 </script>
49 </body>
50 </html>