OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Tests behavior when quitting apps with app shims. | 5 // Tests behavior when quitting apps with app shims. |
6 | 6 |
7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "apps/app_shim/app_shim_host_manager_mac.h" | 10 #include "apps/app_shim/app_shim_host_manager_mac.h" |
11 #include "apps/app_shim/extension_app_shim_handler_mac.h" | 11 #include "apps/app_shim/extension_app_shim_handler_mac.h" |
12 #include "apps/switches.h" | 12 #include "apps/switches.h" |
13 #include "chrome/browser/apps/app_browsertest_util.h" | 13 #include "chrome/browser/apps/app_browsertest_util.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/browser_shutdown.h" | 15 #include "chrome/browser/browser_shutdown.h" |
16 #include "chrome/browser/extensions/extension_test_message_listener.h" | |
17 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
19 #include "chrome/test/base/interactive_test_utils.h" | 18 #include "chrome/test/base/interactive_test_utils.h" |
20 #include "content/public/test/test_utils.h" | 19 #include "content/public/test/test_utils.h" |
21 #include "extensions/browser/extension_registry.h" | 20 #include "extensions/browser/extension_registry.h" |
| 21 #include "extensions/test/extension_test_message_listener.h" |
22 #include "ui/events/test/cocoa_test_event_utils.h" | 22 #include "ui/events/test/cocoa_test_event_utils.h" |
23 | 23 |
24 using extensions::PlatformAppBrowserTest; | 24 using extensions::PlatformAppBrowserTest; |
25 | 25 |
26 namespace apps { | 26 namespace apps { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 class FakeHost : public apps::AppShimHandler::Host { | 30 class FakeHost : public apps::AppShimHandler::Host { |
31 public: | 31 public: |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 atStart:NO]; | 123 atStart:NO]; |
124 | 124 |
125 // This will time out if the event above does not terminate Chrome. | 125 // This will time out if the event above does not terminate Chrome. |
126 content::RunMessageLoop(); | 126 content::RunMessageLoop(); |
127 | 127 |
128 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); | 128 EXPECT_FALSE(handler_->FindHost(profile(), extension_id_)); |
129 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); | 129 EXPECT_TRUE(browser_shutdown::IsTryingToQuit()); |
130 } | 130 } |
131 | 131 |
132 } // namespace apps | 132 } // namespace apps |
OLD | NEW |