OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ui/settings_window_manager.h" | 5 #include "chrome/browser/ui/settings_window_manager.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 187 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
188 | 188 |
189 // History should open in the existing browser window. | 189 // History should open in the existing browser window. |
190 chrome::ShowHistory(browser()); | 190 chrome::ShowHistory(browser()); |
191 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 191 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
192 | 192 |
193 // Settings should open a new browser window. | 193 // Settings should open a new browser window. |
194 chrome::ShowSettings(browser()); | 194 chrome::ShowSettings(browser()); |
195 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); | 195 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); |
196 | 196 |
| 197 // About should reuse the existing Settings window. |
| 198 chrome::ShowAboutChrome(browser()); |
| 199 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); |
| 200 |
197 // Extensions should open in an existing browser window. | 201 // Extensions should open in an existing browser window. |
198 CloseNonDefaultBrowsers(); | 202 CloseNonDefaultBrowsers(); |
199 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 203 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
200 std::string extension_to_highlight; // none | 204 std::string extension_to_highlight; // none |
201 chrome::ShowExtensions(browser(), extension_to_highlight); | 205 chrome::ShowExtensions(browser(), extension_to_highlight); |
202 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 206 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
203 | 207 |
204 // Downloads should open in an existing browser window. | 208 // Downloads should open in an existing browser window. |
205 chrome::ShowDownloads(browser()); | 209 chrome::ShowDownloads(browser()); |
206 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); | 210 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); |
| 211 |
| 212 // About should open a new browser window. |
| 213 chrome::ShowAboutChrome(browser()); |
| 214 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); |
207 } | 215 } |
OLD | NEW |