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_lifetime_monitor_factory.h" | 8 #include "apps/app_lifetime_monitor_factory.h" |
9 #include "apps/switches.h" | 9 #include "apps/switches.h" |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 #import "ui/events/test/cocoa_test_event_utils.h" | 38 #import "ui/events/test/cocoa_test_event_utils.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 // General end-to-end test for app shims. | 42 // General end-to-end test for app shims. |
43 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { | 43 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { |
44 protected: | 44 protected: |
45 AppShimInteractiveTest() | 45 AppShimInteractiveTest() |
46 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} | 46 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} |
47 | 47 |
| 48 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 49 PlatformAppBrowserTest::SetUpCommandLine(command_line); |
| 50 command_line->AppendSwitch(switches::kEnableNewBookmarkApps); |
| 51 } |
| 52 |
48 private: | 53 private: |
49 // Temporarily enable app shims. | 54 // Temporarily enable app shims. |
50 base::AutoReset<bool> auto_reset_; | 55 base::AutoReset<bool> auto_reset_; |
51 | 56 |
52 DISALLOW_COPY_AND_ASSIGN(AppShimInteractiveTest); | 57 DISALLOW_COPY_AND_ASSIGN(AppShimInteractiveTest); |
53 }; | 58 }; |
54 | 59 |
55 // Watches for changes to a file. This is designed to be used from the the UI | 60 // Watches for changes to a file. This is designed to be used from the the UI |
56 // thread. | 61 // thread. |
57 class WindowedFilePathWatcher | 62 class WindowedFilePathWatcher |
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // the shim is rebuilt. | 711 // the shim is rebuilt. |
707 WindowedAppShimLaunchObserver(app->id()).Wait(); | 712 WindowedAppShimLaunchObserver(app->id()).Wait(); |
708 | 713 |
709 EXPECT_TRUE(GetFirstAppWindow()); | 714 EXPECT_TRUE(GetFirstAppWindow()); |
710 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); | 715 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); |
711 } | 716 } |
712 | 717 |
713 #endif // defined(ARCH_CPU_64_BITS) | 718 #endif // defined(ARCH_CPU_64_BITS) |
714 | 719 |
715 } // namespace apps | 720 } // namespace apps |
OLD | NEW |