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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { | 46 class AppShimInteractiveTest : public extensions::PlatformAppBrowserTest { |
47 protected: | 47 protected: |
48 // Type of app to install, when invoking InstallAppWithShim(). | 48 // Type of app to install, when invoking InstallAppWithShim(). |
49 enum AppType { APP_TYPE_PACKAGED, APP_TYPE_HOSTED }; | 49 enum AppType { APP_TYPE_PACKAGED, APP_TYPE_HOSTED }; |
50 | 50 |
51 AppShimInteractiveTest() | 51 AppShimInteractiveTest() |
52 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} | 52 : auto_reset_(&g_app_shims_allow_update_and_launch_in_tests, true) {} |
53 | 53 |
54 // testing::Test: | 54 // testing::Test: |
55 void SetUp() override { | 55 void SetUp() override { |
| 56 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); |
56 PlatformAppBrowserTest::SetUp(); | 57 PlatformAppBrowserTest::SetUp(); |
57 scoped_feature_list_.InitAndEnableFeature(features::kBookmarkApps); | |
58 } | 58 } |
59 | 59 |
60 // Install a test app of |type| and reliably wait for its app shim to be | 60 // Install a test app of |type| and reliably wait for its app shim to be |
61 // created on disk. Sets |shim_path_|. | 61 // created on disk. Sets |shim_path_|. |
62 const extensions::Extension* InstallAppWithShim(AppType type, | 62 const extensions::Extension* InstallAppWithShim(AppType type, |
63 const char* name); | 63 const char* name); |
64 | 64 |
65 protected: | 65 protected: |
66 base::FilePath shim_path_; | 66 base::FilePath shim_path_; |
67 | 67 |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 // the shim is rebuilt. | 626 // the shim is rebuilt. |
627 WindowedAppShimLaunchObserver(app->id()).Wait(); | 627 WindowedAppShimLaunchObserver(app->id()).Wait(); |
628 | 628 |
629 EXPECT_TRUE(GetFirstAppWindow()); | 629 EXPECT_TRUE(GetFirstAppWindow()); |
630 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); | 630 EXPECT_TRUE(HasAppShimHost(profile(), app->id())); |
631 } | 631 } |
632 | 632 |
633 #endif // defined(ARCH_CPU_64_BITS) | 633 #endif // defined(ARCH_CPU_64_BITS) |
634 | 634 |
635 } // namespace apps | 635 } // namespace apps |
OLD | NEW |