8 if (window
.testRunner
) {
9 window
.testRunner
.dumpAsText();
10 window
.testRunner
.waitUntilDone();
14 for (var i
= 0; i
< actionitems
.length
; i
++)
16 var title
= actionitems
[i
].title
;
21 title
= title
.replace(/_
/g
,'');
23 if (title
.match("Copy Image")) {
24 actionitems
[i
].click();
29 document
.body
.innerHTML
= "PASS";
31 window
.testRunner
.notifyDone();
35 document
.getElementById("DIV").style
.display
="none";
39 if (!window
.testRunner
) {
40 document
.body
.addEventListener('mousedown', function () {setTimeout(hideDiv
, 100)}, false);
44 var image
= document
.getElementById("IMG");
46 x
= image
.offsetLeft
+ 10;
47 y
= image
.offsetTop
+ 10;
49 eventSender
.mouseMoveTo(x
, y
);
50 actionitems
= eventSender
.contextClick();
54 setTimeout(doClick
, 10);
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.
64 <img id=
"IMG" src=
"resources/apple.gif"/>