5 Test that we don't create a new user gesture indicator every time
6 an event is passed to an iframe.
9 To run, click on the iframe. The test passes, if only one window
10 is opened in response to the click.
12 <iframe id=
"iframe" src=
"about:blank"></iframe>
13 <div id=
"console"></div>
15 var iframe
= document
.getElementById("iframe");
16 iframe
.contentDocument
.body
.onclick = function() {
17 window
.open("about:blank", "window1");
18 window
.open("about:blank", "window2");
19 if (window
.testRunner
) {
20 if (testRunner
.windowCount() == windowCount
+ 1)
21 document
.getElementById("console").innerText
= "PASSED";
23 document
.getElementById("console").innerText
= "FAILED";
24 testRunner
.notifyDone();
28 if (window
.testRunner
) {
29 testRunner
.dumpAsText();
30 testRunner
.setCanOpenWindows();
31 testRunner
.setPopupBlockingEnabled(true);
32 testRunner
.setCloseRemainingWindowsWhenComplete(true);
33 testRunner
.waitUntilDone();
34 windowCount
= testRunner
.windowCount();
36 var frame
= document
.getElementById("iframe");
38 if (window
.eventSender
) {
39 eventSender
.mouseMoveTo(frame
.offsetLeft
+ frame
.offsetWidth
/ 2, frame
.offsetTop
+ frame
.offsetHeight
/ 2);
40 eventSender
.mouseDown();
41 eventSender
.mouseUp();