OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "apps/app_shim/app_shim_handler_mac.h" | 8 #include "apps/app_shim/app_shim_handler_mac.h" |
9 #include "apps/app_shim/app_shim_host_manager_mac.h" | 9 #include "apps/app_shim/app_shim_host_manager_mac.h" |
10 #include "apps/app_shim/extension_app_shim_handler_mac.h" | 10 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
11 #include "apps/switches.h" | 11 #include "apps/switches.h" |
12 #include "base/auto_reset.h" | 12 #include "base/auto_reset.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/files/file_path_watcher.h" | 14 #include "base/files/file_path_watcher.h" |
15 #include "base/mac/foundation_util.h" | 15 #include "base/mac/foundation_util.h" |
16 #include "base/mac/launch_services_util.h" | 16 #include "base/mac/launch_services_util.h" |
17 #include "base/mac/mac_util.h" | 17 #include "base/mac/mac_util.h" |
18 #include "base/mac/scoped_nsobject.h" | 18 #include "base/mac/scoped_nsobject.h" |
19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
20 #include "base/process/launch.h" | 20 #include "base/process/launch.h" |
21 #include "base/strings/sys_string_conversions.h" | 21 #include "base/strings/sys_string_conversions.h" |
22 #include "base/test/test_timeouts.h" | 22 #include "base/test/test_timeouts.h" |
23 #include "chrome/browser/apps/app_browsertest_util.h" | 23 #include "chrome/browser/apps/app_browsertest_util.h" |
24 #include "chrome/browser/browser_process.h" | 24 #include "chrome/browser/browser_process.h" |
25 #include "chrome/browser/extensions/extension_test_message_listener.h" | |
26 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
27 #include "chrome/browser/web_applications/web_app_mac.h" | 26 #include "chrome/browser/web_applications/web_app_mac.h" |
28 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
29 #include "chrome/common/chrome_switches.h" | 28 #include "chrome/common/chrome_switches.h" |
30 #include "chrome/common/mac/app_mode_common.h" | 29 #include "chrome/common/mac/app_mode_common.h" |
31 #include "content/public/test/test_utils.h" | 30 #include "content/public/test/test_utils.h" |
32 #include "extensions/browser/app_window/native_app_window.h" | 31 #include "extensions/browser/app_window/native_app_window.h" |
33 #include "extensions/browser/extension_registry.h" | 32 #include "extensions/browser/extension_registry.h" |
| 33 #include "extensions/test/extension_test_message_listener.h" |
34 #import "ui/events/test/cocoa_test_event_utils.h" | 34 #import "ui/events/test/cocoa_test_event_utils.h" |
35 | 35 |
36 namespace { | 36 namespace { |
37 | 37 |
38 // General end-to-end test for app shims. | 38 // General end-to-end test for app shims. |
39 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { | 39 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { |
40 protected: | 40 protected: |
41 AppShimInteractiveTest() | 41 AppShimInteractiveTest() |
42 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} | 42 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} |
43 | 43 |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 // the shim is rebuilt. | 390 // the shim is rebuilt. |
391 WindowedAppShimLaunchObserver(app->id()).Wait(); | 391 WindowedAppShimLaunchObserver(app->id()).Wait(); |
392 | 392 |
393 EXPECT_TRUE(GetFirstAppWindow()); | 393 EXPECT_TRUE(GetFirstAppWindow()); |
394 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); | 394 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); |
395 } | 395 } |
396 | 396 |
397 #endif // defined(ARCH_CPU_64_BITS) | 397 #endif // defined(ARCH_CPU_64_BITS) |
398 | 398 |
399 } // namespace apps | 399 } // namespace apps |
OLD | NEW |