| OLD | NEW |
| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 class AppControllerNewProfileManagementBrowserTest | 200 class AppControllerNewProfileManagementBrowserTest |
| 201 : public InProcessBrowserTest { | 201 : public InProcessBrowserTest { |
| 202 protected: | 202 protected: |
| 203 AppControllerNewProfileManagementBrowserTest() | 203 AppControllerNewProfileManagementBrowserTest() |
| 204 : active_browser_list_(BrowserList::GetInstance( | 204 : active_browser_list_(BrowserList::GetInstance( |
| 205 chrome::GetActiveDesktop())) { | 205 chrome::GetActiveDesktop())) { |
| 206 } | 206 } |
| 207 | 207 |
| 208 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 208 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
| 209 command_line->AppendSwitch(switches::kNewProfileManagement); | 209 command_line->AppendSwitch(switches::kEnableNewProfileManagement); |
| 210 } | 210 } |
| 211 | 211 |
| 212 const BrowserList* active_browser_list_; | 212 const BrowserList* active_browser_list_; |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 // 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. |
| 216 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, | 216 IN_PROC_BROWSER_TEST_F(AppControllerNewProfileManagementBrowserTest, |
| 217 RegularProfileReopenWithNoWindows) { | 217 RegularProfileReopenWithNoWindows) { |
| 218 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); | 218 base::scoped_nsobject<AppController> ac([[AppController alloc] init]); |
| 219 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 Loading... |
| 323 | 323 |
| 324 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, | 324 IN_PROC_BROWSER_TEST_F(AppControllerOpenShortcutBrowserTest, |
| 325 OpenShortcutOnStartup) { | 325 OpenShortcutOnStartup) { |
| 326 EXPECT_EQ(1, browser()->tab_strip_model()->count()); | 326 EXPECT_EQ(1, browser()->tab_strip_model()->count()); |
| 327 EXPECT_EQ(g_open_shortcut_url, | 327 EXPECT_EQ(g_open_shortcut_url, |
| 328 browser()->tab_strip_model()->GetActiveWebContents() | 328 browser()->tab_strip_model()->GetActiveWebContents() |
| 329 ->GetLastCommittedURL()); | 329 ->GetLastCommittedURL()); |
| 330 } | 330 } |
| 331 | 331 |
| 332 } // namespace | 332 } // namespace |
| OLD | NEW |