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

Side by Side Diff: chrome/browser/app_controller_mac_browsertest.mm

Issue 323133005: Enable consistent identity on android platform by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import <Carbon/Carbon.h> 5 #import <Carbon/Carbon.h>
6 #import <Cocoa/Cocoa.h> 6 #import <Cocoa/Cocoa.h>
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 #import <Foundation/NSAppleEventDescriptor.h> 8 #import <Foundation/NSAppleEventDescriptor.h>
9 #import <objc/message.h> 9 #import <objc/message.h>
10 #import <objc/runtime.h> 10 #import <objc/runtime.h>
(...skipping 14 matching lines...) Expand all
25 #include "chrome/browser/ui/browser_window.h" 25 #include "chrome/browser/ui/browser_window.h"
26 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" 26 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
27 #include "chrome/browser/ui/host_desktop.h" 27 #include "chrome/browser/ui/host_desktop.h"
28 #include "chrome/browser/ui/tabs/tab_strip_model.h" 28 #include "chrome/browser/ui/tabs/tab_strip_model.h"
29 #include "chrome/common/chrome_constants.h" 29 #include "chrome/common/chrome_constants.h"
30 #include "chrome/common/chrome_switches.h" 30 #include "chrome/common/chrome_switches.h"
31 #include "chrome/common/pref_names.h" 31 #include "chrome/common/pref_names.h"
32 #include "chrome/common/url_constants.h" 32 #include "chrome/common/url_constants.h"
33 #include "chrome/test/base/in_process_browser_test.h" 33 #include "chrome/test/base/in_process_browser_test.h"
34 #include "chrome/test/base/ui_test_utils.h" 34 #include "chrome/test/base/ui_test_utils.h"
35 #include "components/signin/core/common/profile_management_switches.h"
35 #include "content/public/browser/web_contents.h" 36 #include "content/public/browser/web_contents.h"
36 #include "extensions/common/extension.h" 37 #include "extensions/common/extension.h"
37 #include "net/test/embedded_test_server/embedded_test_server.h" 38 #include "net/test/embedded_test_server/embedded_test_server.h"
38 39
39 namespace { 40 namespace {
40 41
41 GURL g_open_shortcut_url = GURL::EmptyGURL(); 42 GURL g_open_shortcut_url = GURL::EmptyGURL();
42 43
43 } // namespace 44 } // namespace
44 45
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 class AppControllerNewProfileManagementBrowserTest 201 class AppControllerNewProfileManagementBrowserTest
201 : public InProcessBrowserTest { 202 : public InProcessBrowserTest {
202 protected: 203 protected:
203 AppControllerNewProfileManagementBrowserTest() 204 AppControllerNewProfileManagementBrowserTest()
204 : active_browser_list_(BrowserList::GetInstance( 205 : active_browser_list_(BrowserList::GetInstance(
205 chrome::GetActiveDesktop())) { 206 chrome::GetActiveDesktop())) {
206 } 207 }
207 208
208 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 209 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
209 command_line->AppendSwitch(switches::kNewProfileManagement); 210 switches::EnableNewProfileManagementForTesting(command_line);
210 } 211 }
211 212
212 const BrowserList* active_browser_list_; 213 const BrowserList* active_browser_list_;
213 }; 214 };
214 215
215 // Test that for a regular last profile, a reopen event opens a browser. 216 // Test that for a regular last profile, a reopen event opens a browser.
216 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, 217 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest,
217 RegularProfileReopenWithNoWindows) { 218 RegularProfileReopenWithNoWindows) {
218 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); 219 base::scoped_nsobject<AppController> ac([[AppController alloc] init]);
219 EXPECT_EQ(1u, active_browser_list_->size()); 220 EXPECT_EQ(1u, active_browser_list_->size());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 324
324 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, 325 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest,
325 OpenShortcutOnStartup) { 326 OpenShortcutOnStartup) {
326 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 327 EXPECT_EQ(1, browser()->tab_strip_model()->count());
327 EXPECT_EQ(g_open_shortcut_url, 328 EXPECT_EQ(g_open_shortcut_url,
328 browser()->tab_strip_model()->GetActiveWebContents() 329 browser()->tab_strip_model()->GetActiveWebContents()
329 ->GetLastCommittedURL()); 330 ->GetLastCommittedURL());
330 } 331 }
331 332
332 } // namespace 333 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/chromeos/profiles/profile_list_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698