Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / misc / drag-not-loaded-image.html
blobc0e501f6c5ae37137f5138ae9930b380b75cff7d
1 <html>
2 <head>
3 <script>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
6 testRunner.dumpAsText();
9 function log(text)
11 var console = document.getElementById('console');
12 console.appendChild(document.createTextNode(text));
13 console.appendChild(document.createElement('br'));
15 </script>
16 <body>
17 <img id="imageSlow"
18 src="resources/image-slow.pl" width="128" height="128">
19 <div id="console"></div>
20 <script language="JavaScript">
21 var e = document.getElementById("imageSlow");
22 function runTest() {
23 readyState = document.readyState;
24 if (readyState == 'complete') {
25 log("Success")
26 testRunner.notifyDone()
27 } else if (readyState == 'loading' || readyState == 'interactive') {
28 x = e.offsetLeft + e.offsetWidth / 2;
29 y = e.offsetTop + e.offsetHeight / 2;
31 eventSender.mouseMoveTo(x, y);
32 eventSender.mouseDown();
33 eventSender.mouseMoveTo(x + 100, y + 100);
34 eventSender.mouseUp();
35 setTimeout("runTest()", 50);
39 runTest();
40 </script>
41 </body>
42 </head>
43 </html>