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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_triggered_reset_browsertest_win.cc

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 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
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/callback_list.h" 7 #include "base/callback_list.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 14 matching lines...) Expand all
25 #include "chrome/test/base/ui_test_utils.h" 25 #include "chrome/test/base/ui_test_utils.h"
26 #include "components/keyed_service/content/browser_context_dependency_manager.h" 26 #include "components/keyed_service/content/browser_context_dependency_manager.h"
27 #include "net/test/embedded_test_server/embedded_test_server.h" 27 #include "net/test/embedded_test_server/embedded_test_server.h"
28 #include "testing/gtest/include/gtest/gtest.h" 28 #include "testing/gtest/include/gtest/gtest.h"
29 29
30 namespace { 30 namespace {
31 31
32 // Check that there are two browsers. Find the one that is not |browser|. 32 // Check that there are two browsers. Find the one that is not |browser|.
33 Browser* FindOneOtherBrowser(Browser* browser) { 33 Browser* FindOneOtherBrowser(Browser* browser) {
34 // There should only be one other browser. 34 // There should only be one other browser.
35 EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile(), 35 EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile()));
36 browser->host_desktop_type()));
37 36
38 // Find the new browser. 37 // Find the new browser.
39 for (auto* b : *BrowserList::GetInstance()) { 38 for (auto* b : *BrowserList::GetInstance()) {
40 if (b != browser) 39 if (b != browser)
41 return b; 40 return b;
42 } 41 }
43 42
44 return nullptr; 43 return nullptr;
45 } 44 }
46 45
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 238
240 // Same kind of simple non-process-startup browser launch. 239 // Same kind of simple non-process-startup browser launch.
241 { 240 {
242 StartupBrowserCreatorImpl launch(base::FilePath(), dummy, 241 StartupBrowserCreatorImpl launch(base::FilePath(), dummy,
243 chrome::startup::IS_NOT_FIRST_RUN); 242 chrome::startup::IS_NOT_FIRST_RUN);
244 ASSERT_TRUE(launch.Launch(other_profile, std::vector<GURL>(), false, 243 ASSERT_TRUE(launch.Launch(other_profile, std::vector<GURL>(), false,
245 new_browser->host_desktop_type())); 244 new_browser->host_desktop_type()));
246 } 245 }
247 246
248 Browser* other_profile_browser = 247 Browser* other_profile_browser =
249 chrome::FindBrowserWithProfile(other_profile, 248 chrome::FindBrowserWithProfile(other_profile);
250 new_browser->host_desktop_type());
251 ASSERT_NE(nullptr, other_profile_browser); 249 ASSERT_NE(nullptr, other_profile_browser);
252 250
253 // Check for the expected reset dialog in the second browser too. 251 // Check for the expected reset dialog in the second browser too.
254 TabStripModel* other_tab_strip = other_profile_browser->tab_strip_model(); 252 TabStripModel* other_tab_strip = other_profile_browser->tab_strip_model();
255 ASSERT_LT(0, other_tab_strip->count()); 253 ASSERT_LT(0, other_tab_strip->count());
256 EXPECT_EQ(internals::GetTriggeredResetSettingsURL(), 254 EXPECT_EQ(internals::GetTriggeredResetSettingsURL(),
257 other_tab_strip->GetActiveWebContents()->GetURL()); 255 other_tab_strip->GetActiveWebContents()->GetURL());
258 g_browser_process->ReleaseModule(); 256 g_browser_process->ReleaseModule();
259 } 257 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698