| 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> |
| 11 | 11 |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/mac/foundation_util.h" | 13 #include "base/mac/foundation_util.h" |
| 14 #include "base/mac/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
| 15 #include "base/prefs/pref_service.h" | 15 #include "base/prefs/pref_service.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "base/strings/sys_string_conversions.h" | 17 #include "base/strings/sys_string_conversions.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "chrome/app/chrome_command_ids.h" | 19 #include "chrome/app/chrome_command_ids.h" |
| 20 #import "chrome/browser/app_controller_mac.h" | 20 #import "chrome/browser/app_controller_mac.h" |
| 21 #include "chrome/browser/apps/app_browsertest_util.h" | 21 #include "chrome/browser/apps/app_browsertest_util.h" |
| 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
| 23 #include "chrome/browser/browser_process.h" | 23 #include "chrome/browser/browser_process.h" |
| 24 #include "chrome/browser/history/history_service_factory.h" | 24 #include "chrome/browser/history/history_service_factory.h" |
| 25 #include "chrome/browser/profiles/profile_manager.h" | 25 #include "chrome/browser/profiles/profile_manager.h" |
| 26 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
| 27 #include "chrome/browser/ui/browser_list.h" | 27 #include "chrome/browser/ui/browser_list.h" |
| 28 #include "chrome/browser/ui/browser_navigator_params.h" |
| 28 #include "chrome/browser/ui/browser_window.h" | 29 #include "chrome/browser/ui/browser_window.h" |
| 29 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" | 30 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_menu_bridge.h" |
| 30 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" | 31 #include "chrome/browser/ui/cocoa/history_menu_bridge.h" |
| 31 #include "chrome/browser/ui/cocoa/run_loop_testing.h" | 32 #include "chrome/browser/ui/cocoa/run_loop_testing.h" |
| 32 #include "chrome/browser/ui/host_desktop.h" | 33 #include "chrome/browser/ui/host_desktop.h" |
| 33 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 34 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 34 #include "chrome/browser/ui/user_manager.h" | 35 #include "chrome/browser/ui/user_manager.h" |
| 35 #include "chrome/common/chrome_constants.h" | 36 #include "chrome/common/chrome_constants.h" |
| 36 #include "chrome/common/chrome_switches.h" | 37 #include "chrome/common/chrome_switches.h" |
| 37 #include "chrome/common/pref_names.h" | 38 #include "chrome/common/pref_names.h" |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 ui_test_utils::NavigateToURL(browser3, test_url1); | 692 ui_test_utils::NavigateToURL(browser3, test_url1); |
| 692 EXPECT_EQ(g_handoff_url, GURL()); | 693 EXPECT_EQ(g_handoff_url, GURL()); |
| 693 | 694 |
| 694 // Activate the original browser window. | 695 // Activate the original browser window. |
| 695 Browser* browser1 = active_browser_list->get(0); | 696 Browser* browser1 = active_browser_list->get(0); |
| 696 browser1->window()->Show(); | 697 browser1->window()->Show(); |
| 697 EXPECT_EQ(g_handoff_url, test_url2); | 698 EXPECT_EQ(g_handoff_url, test_url2); |
| 698 } | 699 } |
| 699 | 700 |
| 700 } // namespace | 701 } // namespace |
| OLD | NEW |