Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / popup-blocking-timers3.html
blob299b68ceed326d715a5ba61d3b898f786a3560d4
1 <!DOCTYPE html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var newWindow;
6 var intervalId;
7 var firstIntervalExecution = true;
9 if (window.testRunner) {
10 testRunner.dumpAsText();
11 testRunner.setCanOpenWindows();
12 testRunner.waitUntilDone();
13 testRunner.setPopupBlockingEnabled(true);
16 function clickHandler() {
17 intervalId = setInterval(function() {
18 debug("Test calling window.open() in a 100 ms interval. A popup should only be allowed on the first execution of the interval.");
19 newWindow = window.open("about:blank");
20 self.focus();
21 if (firstIntervalExecution) {
22 shouldBeNonNull("newWindow");
23 firstIntervalExecution = false;
24 } else {
25 shouldBeUndefined("newWindow");
26 clearInterval(intervalId);
27 if (window.testRunner)
28 testRunner.notifyDone();
30 }, 100);
33 function clickButton() {
34 var button = document.getElementById("test");
35 var buttonX = button.offsetLeft + button.offsetWidth / 2;
36 var buttonY = button.offsetTop + button.offsetHeight / 2;
37 if (window.eventSender) {
38 eventSender.mouseMoveTo(buttonX, buttonY);
39 eventSender.mouseDown();
40 eventSender.mouseUp();
43 </script>
44 </head>
45 <body onload="clickButton()">
46 <button id="test" onclick="clickHandler()">Click Here</button>
47 <div id="console"></div>
48 </body>