OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
7 #include "chrome/browser/ui/browser_list.h" | 7 #include "chrome/browser/ui/browser_list.h" |
8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
9 #include "chrome/common/chrome_switches.h" | 9 #include "chrome/common/chrome_switches.h" |
10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #if defined(TOOLKIT_USES_GTK) | 68 #if defined(TOOLKIT_USES_GTK) |
69 // This window type tells the cros window manager to treat the window | 69 // This window type tells the cros window manager to treat the window |
70 // as a panel. | 70 // as a panel. |
71 EXPECT_EQ( | 71 EXPECT_EQ( |
72 WM_IPC_WINDOW_CHROME_PANEL_CONTENT, | 72 WM_IPC_WINDOW_CHROME_PANEL_CONTENT, |
73 WmIpc::instance()->GetWindowType( | 73 WmIpc::instance()->GetWindowType( |
74 GTK_WIDGET(new_browser->window()->GetNativeHandle()), NULL)); | 74 GTK_WIDGET(new_browser->window()->GetNativeHandle()), NULL)); |
75 #endif | 75 #endif |
76 } | 76 } |
77 | 77 |
| 78 #if defined(USE_AURA) |
| 79 // crbug.com/105129. |
| 80 #define MAYBE_PanelOpenLarge DISABLED_PanelOpenLarge |
| 81 #else |
| 82 #define MAYBE_PanelOpenLarge PanelOpenLarge |
| 83 #endif |
| 84 |
78 // Large popups should open as new tab. | 85 // Large popups should open as new tab. |
79 IN_PROC_BROWSER_TEST_F(PanelTest, PanelOpenLarge) { | 86 IN_PROC_BROWSER_TEST_F(PanelTest, MAYBE_PanelOpenLarge) { |
80 const std::string HTML = | 87 const std::string HTML = |
81 "<html><head><title>PanelOpen</title></head>" | 88 "<html><head><title>PanelOpen</title></head>" |
82 "<body onload='window.setTimeout(run_tests, 0)'>" | 89 "<body onload='window.setTimeout(run_tests, 0)'>" |
83 "<script>" | 90 "<script>" |
84 " function run_tests() {" | 91 " function run_tests() {" |
85 " window.open(null, null, 'width=1000,height=1000');" | 92 " window.open(null, null, 'width=1000,height=1000');" |
86 " }" | 93 " }" |
87 "</script>" | 94 "</script>" |
88 "</body></html>"; | 95 "</body></html>"; |
89 GURL url("data:text/html," + HTML); | 96 GURL url("data:text/html," + HTML); |
(...skipping 13 matching lines...) Expand all Loading... |
103 if (*i != browser()) | 110 if (*i != browser()) |
104 new_browser = *i; | 111 new_browser = *i; |
105 } | 112 } |
106 EXPECT_FALSE(new_browser); | 113 EXPECT_FALSE(new_browser); |
107 | 114 |
108 // Should find a new tab. | 115 // Should find a new tab. |
109 EXPECT_EQ(old_tab_count + 1, browser()->tab_count()); | 116 EXPECT_EQ(old_tab_count + 1, browser()->tab_count()); |
110 } | 117 } |
111 | 118 |
112 } // namespace chromeos | 119 } // namespace chromeos |
OLD | NEW |