Change log level: info -> debug
[framework/web/webkit-efl.git] / LayoutTests / editing / pasteboard / copy-standalone-image-crash.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5
6 var actionitems;
7
8 if (window.testRunner) {
9      window.testRunner.dumpAsText();
10      window.testRunner.waitUntilDone();
11 }
12
13 function doClick() {
14     for (var i = 0; i < actionitems.length; i++)
15     {
16         var title = actionitems[i].title;
17
18         if (!title)
19            break;
20
21         title = title.replace(/_/g,'');
22
23         if (title.match("Copy Image")) {
24            actionitems[i].click();
25            break;
26         }
27     }
28
29     document.body.innerHTML = "PASS";
30
31     window.testRunner.notifyDone();
32 }
33
34 function hideDiv() {
35     document.getElementById("DIV").style.display="none";
36 }
37
38 function doTest() {
39     if (!window.testRunner) {
40         document.body.addEventListener('mousedown', function () {setTimeout(hideDiv, 100)}, false);
41         return;
42     }
43
44     var image = document.getElementById("IMG");
45
46     x = image.offsetLeft + 10;
47     y = image.offsetTop + 10;
48
49     eventSender.mouseMoveTo(x, y);
50     actionitems = eventSender.contextClick();
51
52     hideDiv();
53
54     setTimeout(doClick, 10);
55 }
56
57 </script>
58 </head>
59 <body onload="doTest()">
60 This is an automated test case for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=31721">31721</a><br>
61 If you wish to test manually, mouseover to image, activate context menu, wait for the image to disappear and then click copy image.<br>
62 There should be no crash.
63 <div ID="DIV">
64     <img id="IMG" src="resources/apple.gif"/>
65     </div>
66 </body>
67
68 </html>