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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/Window/open-as-popup-vs-tab.html

Issue 2773573002: window.open() should gate new tab/new popup based on toolbar visibility. (Closed)
Patch Set: buttons Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('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 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>window.open: popup vs tab</title>
6 <script src="../../../resources/testharness.js"></script>
7 <script src="../../../resources/testharnessreport.js"></script>
8 </head>
9 <body>
10 <script>
11 function openToolbarOnWindow() {
12 return window.open("", "", "toolbar=1");
13 };
14 function openToolbarOffWindow() {
15 return window.open("", "", "toolbar=0");
16 }
17 function openDefaultFeaturesWindow() {
18 return window.open();
19 }
20 test(function() {
21 var w = openToolbarOnWindow();
22 assert_equals(w.toolbar.visible, true);
23 w.close();
24 }, "window.open with toolbar=1 creates a new tab");
25 test(function() {
26 var w = openToolbarOffWindow();
27 assert_equals(w.toolbar.visible, false);
28 w.close();
29 }, "window.open with toolbar=0 creates a new popup");
30 test(function() {
31 var w = openDefaultFeaturesWindow();
32 assert_equals(w.toolbar.visible, true);
33 w.close();
34 }, "window.open defaults to creating a new tab");
35 </script>
36 <button onclick="openToolbarOnWindow()">Window Features: toolbar=1</button>
37 <button onclick="openToolbarOffWindow()">Window Features: toolbar=0</button>
38 <button onclick="openDefaultFeaturesWindow()">Window Features: default</button >
39 </body>
40 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/ChromeClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698