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

Side by Side Diff: LayoutTests/platform/chromium/fast/events/popup-allowed-from-gesture-only-once-iframes.html

Issue 14120003: Move LayoutTests from platform/chromium/... to generic location (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>
5 Test that we don't create a new user gesture indicator every time
6 an event is passed to an iframe.
7 </p>
8 <p>
9 To run, click on the iframe. The test passes, if only one window
10 is opened in response to the click.
11 </p>
12 <iframe id="iframe" src="about:blank"></iframe>
13 <div id="console"></div>
14 <script>
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";
22 else
23 document.getElementById("console").innerText = "FAILED";
24 testRunner.notifyDone();
25 }
26 }
27
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();
35
36 var frame = document.getElementById("iframe");
37
38 if (window.eventSender) {
39 eventSender.mouseMoveTo(frame.offsetLeft + frame.offsetWidth / 2, frame.offsetTop + frame.offsetHeight / 2);
40 eventSender.mouseDown();
41 eventSender.mouseUp();
42 }
43 }
44 </script>
45 </body>
46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698