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

Side by Side Diff: LayoutTests/fast/events/show-modal-dialog-onblur-onfocus.html

Issue 174073007: Remove deprecated window.showModalDialog() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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 <html>
2 <head>
3 <script>
4 function runTests()
5 {
6 window.onfocus = onFocusFunc;
7 window.onblur = onBlurFunc;
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.setCanOpenWindows();
11 testRunner.waitUntilDone();
12
13 // DumpRenderTreeWindow does not respond to focus events. Forcing o nblur event so
14 // that the results matches what you'll see in the browser.
15 testRunner.setWindowIsKey(false);
16 }
17 showModalDialog("resources/modal-dialog.html");
18 }
19
20 function log(message)
21 {
22 var console = document.getElementById("console");
23 var li = document.createElement("li");
24 var text = document.createTextNode(message);
25
26 console.appendChild(li);
27 li.appendChild(text);
28 }
29
30 function onBlurFunc()
31 {
32 log("onblur fired. Should see this exactly once.");
33 }
34
35 function onFocusFunc()
36 {
37 log("ERROR: onfocus fired.");
38 }
39 </script>
40 </head>
41
42 <body onload="runTests()">
43 <p>Pop up a modal dialog. Verifies that focus events are not fired while in side the message loop.</p><br/>
44 <p>You need to disable pop-up blocker for this test to run successfully in t he browser.</p>
45 <ul id="console"></ul>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698