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

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

Issue 340723002: Revert 277793 "Enable consistent identity on android platform by..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2056/src/
Patch Set: 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"
36 #include "content/public/browser/web_contents.h" 35 #include "content/public/browser/web_contents.h"
37 #include "extensions/common/extension.h" 36 #include "extensions/common/extension.h"
38 #include "net/test/embedded_test_server/embedded_test_server.h" 37 #include "net/test/embedded_test_server/embedded_test_server.h"
39 38
40 namespace { 39 namespace {
41 40
42 GURL g_open_shortcut_url = GURL::EmptyGURL(); 41 GURL g_open_shortcut_url = GURL::EmptyGURL();
43 42
44 } // namespace 43 } // namespace
45 44
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 199
201 class AppControllerNewProfileManagementBrowserTest 200 class AppControllerNewProfileManagementBrowserTest
202 : public InProcessBrowserTest { 201 : public InProcessBrowserTest {
203 protected: 202 protected:
204 AppControllerNewProfileManagementBrowserTest() 203 AppControllerNewProfileManagementBrowserTest()
205 : active_browser_list_(BrowserList::GetInstance( 204 : active_browser_list_(BrowserList::GetInstance(
206 chrome::GetActiveDesktop())) { 205 chrome::GetActiveDesktop())) {
207 } 206 }
208 207
209 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 208 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
210 switches::EnableNewProfileManagementForTesting(command_line); 209 command_line->AppendSwitch(switches::kNewProfileManagement);
211 } 210 }
212 211
213 const BrowserList* active_browser_list_; 212 const BrowserList* active_browser_list_;
214 }; 213 };
215 214
216 // Test that for a regular last profile, a reopen event opens a browser. 215 // Test that for a regular last profile, a reopen event opens a browser.
217 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, 216 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest,
218 RegularProfileReopenWithNoWindows) { 217 RegularProfileReopenWithNoWindows) {
219 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); 218 base::scoped_nsobject<AppController> ac([[AppController alloc] init]);
220 EXPECT_EQ(1u, active_browser_list_->size()); 219 EXPECT_EQ(1u, active_browser_list_->size());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 323
325 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, 324 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest,
326 OpenShortcutOnStartup) { 325 OpenShortcutOnStartup) {
327 EXPECT_EQ(1, browser()->tab_strip_model()->count()); 326 EXPECT_EQ(1, browser()->tab_strip_model()->count());
328 EXPECT_EQ(g_open_shortcut_url, 327 EXPECT_EQ(g_open_shortcut_url,
329 browser()->tab_strip_model()->GetActiveWebContents() 328 browser()->tab_strip_model()->GetActiveWebContents()
330 ->GetLastCommittedURL()); 329 ->GetLastCommittedURL());
331 } 330 }
332 331
333 } // namespace 332 } // 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