Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/popup-blocking-timers6.html

Issue 2379313002: Fix 'noopener' targeting and return value. (Closed)
Patch Set: Rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <head> 2 <head>
3 <script src="../../resources/js-test.js"></script> 3 <script src="../../resources/js-test.js"></script>
4 <script> 4 <script>
5 var newWindow; 5 var newWindow;
6 6
7 if (window.testRunner) { 7 if (window.testRunner) {
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 testRunner.setCanOpenWindows(); 9 testRunner.setCanOpenWindows();
10 testRunner.waitUntilDone(); 10 testRunner.waitUntilDone();
11 testRunner.setPopupBlockingEnabled(true); 11 testRunner.setPopupBlockingEnabled(true);
12 } 12 }
13 13
14 function clickHandler() { 14 function clickHandler() {
15 setTimeout(function() { 15 setTimeout(function() {
16 newWindow = window.open("about:blank"); 16 newWindow = window.open("about:blank");
17 self.focus(); 17 self.focus();
18 debug("Test calling window.open() with a 1001 ms delay. A popup should not be allowed.") 18 debug("Test calling window.open() with a 1001 ms delay. A popup should not be allowed.")
19 shouldBeUndefined("newWindow"); 19 shouldBeNull("newWindow");
20 20
21 if (window.testRunner) 21 if (window.testRunner)
22 testRunner.notifyDone(); 22 testRunner.notifyDone();
23 }, 1001); 23 }, 1001);
24 if (window.eventSender) 24 if (window.eventSender)
25 eventSender.leapForward(1001); 25 eventSender.leapForward(1001);
26 } 26 }
27 27
28 function clickButton() { 28 function clickButton() {
29 var button = document.getElementById("test"); 29 var button = document.getElementById("test");
30 var buttonX = button.offsetLeft + button.offsetWidth / 2; 30 var buttonX = button.offsetLeft + button.offsetWidth / 2;
31 var buttonY = button.offsetTop + button.offsetHeight / 2; 31 var buttonY = button.offsetTop + button.offsetHeight / 2;
32 if (window.eventSender) { 32 if (window.eventSender) {
33 eventSender.mouseMoveTo(buttonX, buttonY); 33 eventSender.mouseMoveTo(buttonX, buttonY);
34 eventSender.mouseDown(); 34 eventSender.mouseDown();
35 eventSender.mouseUp(); 35 eventSender.mouseUp();
36 } 36 }
37 } 37 }
38 </script> 38 </script>
39 </head> 39 </head>
40 <body onload="clickButton()"> 40 <body onload="clickButton()">
41 <button id="test" onclick="clickHandler()">Click Here</button> 41 <button id="test" onclick="clickHandler()">Click Here</button>
42 <div id="console"></div> 42 <div id="console"></div>
43 </body> 43 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698