OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 6 #include "chrome/browser/browser.h" |
7 #include "chrome/browser/browser_list.h" | 7 #include "chrome/browser/browser_list.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
10 #include "chrome/browser/chromeos/wm_ipc.h" | 10 #include "chrome/browser/chromeos/wm_ipc.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 new_browser = *i; | 57 new_browser = *i; |
58 } | 58 } |
59 | 59 |
60 ASSERT_TRUE(new_browser); | 60 ASSERT_TRUE(new_browser); |
61 EXPECT_EQ(Browser::TYPE_POPUP, new_browser->type()); | 61 EXPECT_EQ(Browser::TYPE_POPUP, new_browser->type()); |
62 // This window type tells the cros window manager to treat the window | 62 // This window type tells the cros window manager to treat the window |
63 // as a panel. | 63 // as a panel. |
64 EXPECT_EQ( | 64 EXPECT_EQ( |
65 WmIpc::WINDOW_TYPE_CHROME_PANEL_CONTENT, | 65 WmIpc::WINDOW_TYPE_CHROME_PANEL_CONTENT, |
66 WmIpc::instance()->GetWindowType( | 66 WmIpc::instance()->GetWindowType( |
67 GTK_WIDGET(new_browser->window()->GetNativeHandle()))); | 67 GTK_WIDGET(new_browser->window()->GetNativeHandle()), NULL)); |
68 } | 68 } |
69 | 69 |
70 // Large popups should open as new tab. | 70 // Large popups should open as new tab. |
71 IN_PROC_BROWSER_TEST_F(PanelTest, PanelOpenLarge) { | 71 IN_PROC_BROWSER_TEST_F(PanelTest, PanelOpenLarge) { |
72 const std::string HTML = | 72 const std::string HTML = |
73 "<html><head><title>PanelOpen</title></head>" | 73 "<html><head><title>PanelOpen</title></head>" |
74 "<body onload='window.setTimeout(run_tests, 0)'>" | 74 "<body onload='window.setTimeout(run_tests, 0)'>" |
75 "<script>" | 75 "<script>" |
76 " function run_tests() {" | 76 " function run_tests() {" |
77 " window.open(null, null, 'width=1000,height=1000');" | 77 " window.open(null, null, 'width=1000,height=1000');" |
(...skipping 16 matching lines...) Expand all Loading... |
94 if (*i != browser()) | 94 if (*i != browser()) |
95 new_browser = *i; | 95 new_browser = *i; |
96 } | 96 } |
97 EXPECT_FALSE(new_browser); | 97 EXPECT_FALSE(new_browser); |
98 | 98 |
99 // Should find a new tab. | 99 // Should find a new tab. |
100 EXPECT_EQ(old_tab_count + 1, browser()->tab_count()); | 100 EXPECT_EQ(old_tab_count + 1, browser()->tab_count()); |
101 } | 101 } |
102 | 102 |
103 } // namespace chromeos | 103 } // namespace chromeos |
OLD | NEW |