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

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

Issue 12315094: Remove kDefaultHostDesktopType from browser_finder.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix StartupBrowserCreatorTest.ProfilesWithoutPagesNotLaunched Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 last_opened_profiles.push_back(profile_4); 69 last_opened_profiles.push_back(profile_4);
70 browser_creator.Start(dummy, profile_manager->user_data_dir(), profile_2, 70 browser_creator.Start(dummy, profile_manager->user_data_dir(), profile_2,
71 last_opened_profiles, &return_code); 71 last_opened_profiles, &return_code);
72 72
73 while (!browser_creator.ActivatedProfile()) 73 while (!browser_creator.ActivatedProfile())
74 MessageLoop::current()->RunUntilIdle(); 74 MessageLoop::current()->RunUntilIdle();
75 75
76 Browser* new_browser = NULL; 76 Browser* new_browser = NULL;
77 77
78 // The last used profile (the profile_2 in this case) must be active. 78 // The last used profile (the profile_2 in this case) must be active.
79 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_2)); 79 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_2,
80 browser()->host_desktop_type()));
80 new_browser = FindBrowserWithProfile(profile_2, 81 new_browser = FindBrowserWithProfile(profile_2,
81 chrome::HOST_DESKTOP_TYPE_NATIVE); 82 browser()->host_desktop_type());
82 ASSERT_TRUE(new_browser); 83 ASSERT_TRUE(new_browser);
83 EXPECT_TRUE(new_browser->window()->IsActive()); 84 EXPECT_TRUE(new_browser->window()->IsActive());
84 85
85 // All other profiles browser should not be active. 86 // All other profiles browser should not be active.
86 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_1)); 87 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_1,
88 browser()->host_desktop_type()));
87 new_browser = FindBrowserWithProfile(profile_1, 89 new_browser = FindBrowserWithProfile(profile_1,
88 chrome::HOST_DESKTOP_TYPE_NATIVE); 90 browser()->host_desktop_type());
89 ASSERT_TRUE(new_browser); 91 ASSERT_TRUE(new_browser);
90 EXPECT_FALSE(new_browser->window()->IsActive()); 92 EXPECT_FALSE(new_browser->window()->IsActive());
91 93
92 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_3)); 94 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_3,
95 browser()->host_desktop_type()));
93 new_browser = FindBrowserWithProfile(profile_3, 96 new_browser = FindBrowserWithProfile(profile_3,
94 chrome::HOST_DESKTOP_TYPE_NATIVE); 97 browser()->host_desktop_type());
95 ASSERT_TRUE(new_browser); 98 ASSERT_TRUE(new_browser);
96 EXPECT_FALSE(new_browser->window()->IsActive()); 99 EXPECT_FALSE(new_browser->window()->IsActive());
97 100
98 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_4)); 101 ASSERT_EQ(1u, chrome::GetBrowserCount(profile_4,
102 browser()->host_desktop_type()));
99 new_browser = FindBrowserWithProfile(profile_4, 103 new_browser = FindBrowserWithProfile(profile_4,
100 chrome::HOST_DESKTOP_TYPE_NATIVE); 104 browser()->host_desktop_type());
101 ASSERT_TRUE(new_browser); 105 ASSERT_TRUE(new_browser);
102 EXPECT_FALSE(new_browser->window()->IsActive()); 106 EXPECT_FALSE(new_browser->window()->IsActive());
103 107
104 } 108 }
105 #endif // !OS_MACOSX && !OS_CHROMEOS 109 #endif // !OS_MACOSX && !OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698