| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 | 430 |
| 431 class AppControllerMainMenuBrowserTest : public InProcessBrowserTest { | 431 class AppControllerMainMenuBrowserTest : public InProcessBrowserTest { |
| 432 protected: | 432 protected: |
| 433 AppControllerMainMenuBrowserTest() { | 433 AppControllerMainMenuBrowserTest() { |
| 434 } | 434 } |
| 435 }; | 435 }; |
| 436 | 436 |
| 437 IN_PROC_BROWSER_TEST_F(AppControllerMainMenuBrowserTest, | 437 IN_PROC_BROWSER_TEST_F(AppControllerMainMenuBrowserTest, |
| 438 HistoryMenuResetAfterProfileDeletion) { | 438 HistoryMenuResetAfterProfileDeletion) { |
| 439 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 439 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 440 AppController* ac = [NSApp delegate]; | 440 AppController* ac = |
| 441 base::mac::ObjCCastStrict<AppController>([NSApp delegate]); |
| 441 | 442 |
| 442 // Use the existing profile as profile 1. | 443 // Use the existing profile as profile 1. |
| 443 Profile* profile1 = browser()->profile(); | 444 Profile* profile1 = browser()->profile(); |
| 444 | 445 |
| 445 // Create profile 2. | 446 // Create profile 2. |
| 446 base::FilePath profile2_path = | 447 base::FilePath profile2_path = |
| 447 profile_manager->GenerateNextProfileDirectoryPath(); | 448 profile_manager->GenerateNextProfileDirectoryPath(); |
| 448 base::RunLoop run_loop; | 449 base::RunLoop run_loop; |
| 449 profile_manager->CreateProfileAsync( | 450 profile_manager->CreateProfileAsync( |
| 450 profile2_path, | 451 profile2_path, |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 ui_test_utils::NavigateToURL(browser3, test_url1); | 687 ui_test_utils::NavigateToURL(browser3, test_url1); |
| 687 EXPECT_EQ(g_handoff_url, GURL()); | 688 EXPECT_EQ(g_handoff_url, GURL()); |
| 688 | 689 |
| 689 // Activate the original browser window. | 690 // Activate the original browser window. |
| 690 Browser* browser1 = active_browser_list->get(0); | 691 Browser* browser1 = active_browser_list->get(0); |
| 691 browser1->window()->Show(); | 692 browser1->window()->Show(); |
| 692 EXPECT_EQ(g_handoff_url, test_url2); | 693 EXPECT_EQ(g_handoff_url, test_url2); |
| 693 } | 694 } |
| 694 | 695 |
| 695 } // namespace | 696 } // namespace |
| OLD | NEW |