4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.setCanOpenWindows();
7 testRunner
.setPopupBlockingEnabled(true);
8 testRunner
.setCloseRemainingWindowsWhenComplete(true);
9 testRunner
.waitUntilDone();
13 // Test for select that's not inside a form element
14 var ctrl1
= document
.getElementById('control1');
17 if (window
.testRunner
) {
18 // change the option selection
19 eventSender
.keyDown("e", []);
22 var enterEvent
= document
.createEvent("KeyboardEvents");
23 enterEvent
.initKeyboardEvent("keypress", true, false, window
, "Enter", 0, false, false, false, false, false);
24 ctrl1
.dispatchEvent(enterEvent
);
25 // Change focus to trigger the "Enter" press.
26 var ctrl2
= document
.getElementById('control2');
31 // We rely on sequential ordering of POST processing.
32 var form
= document
.getElementById('form');
34 var form2
= document
.getElementById('form2');
39 <body onload=
"test()">
40 <select onchange=
"onpopup()" id=
"control1"><option value=
"0">abcd
</option><option value=
"0">efgh
</option></select>
41 If the pop-up was not blocked then there will be an PASS message. Otherwise, the test fails.
42 <form id=
"form" action=
"data:text/html,<script>console.log('PASSED')</script>" target
="target">
43 <input id
="control2" type
="submit" value
="Submit to new window"/>
45 <form id
="form2" action
="data:text/html,<b>hello!</b><script>window.testRunner && testRunner.notifyDone()</script>" target
="panel">
46 <input type
="submit" value
="Submit local page Javascript"/>
48 <iframe name
="target"></iframe><iframe name="panel"></iframe>