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

Side by Side Diff: trunk/LayoutTests/fast/events/popup-forwarded-postmessage-blocked.html

Issue 264333002: Revert 172810 "Add a "forwarded" flag to usergesture tokens." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | trunk/LayoutTests/fast/events/popup-forwarded-postmessage-blocked-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <script>
5 var newWindow;
6
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.setCanOpenWindows();
10 testRunner.waitUntilDone();
11 testRunner.setPopupBlockingEnabled(true);
12 }
13
14 function clickHandler() {
15 setTimeout(function() {
16 window.postMessage({}, "*");
17 }, 300);
18 }
19
20 window.onmessage = function(event) {
21 setTimeout(function() {
22 newWindow = window.open("about:blank");
23 self.focus();
24 debug("Test calling window.open() in a nested call to setTimeout (). A popup should not be allowed.")
25 shouldBeUndefined("newWindow");
26 if (window.testRunner)
27 testRunner.notifyDone();
28 }, 0);
29 };
30
31 function clickButton() {
32 var button = document.getElementById("test");
33 var buttonX = button.offsetLeft + button.offsetWidth / 2;
34 var buttonY = button.offsetTop + button.offsetHeight / 2;
35 if (window.eventSender) {
36 eventSender.mouseMoveTo(buttonX, buttonY);
37 eventSender.mouseDown();
38 eventSender.mouseUp();
39 }
40 }
41 </script>
42 </head>
43 <body onload="clickButton()">
44 <button id="test" onclick="clickHandler()">Click Here</button>
45 <div id="console"></div>
46 </body>
OLDNEW
« no previous file with comments | « no previous file | trunk/LayoutTests/fast/events/popup-forwarded-postmessage-blocked-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698