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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/test/test_timeouts.h" | 6 #include "base/test/test_timeouts.h" |
7 #include "base/threading/platform_thread.h" | 7 #include "base/threading/platform_thread.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/automation/automation_util.h" | 10 #include "chrome/browser/automation/automation_util.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "chrome/browser/ui/extensions/application_launch.h" | 26 #include "chrome/browser/ui/extensions/application_launch.h" |
27 #include "chrome/browser/ui/extensions/native_app_window.h" | 27 #include "chrome/browser/ui/extensions/native_app_window.h" |
28 #include "chrome/browser/ui/extensions/shell_window.h" | 28 #include "chrome/browser/ui/extensions/shell_window.h" |
29 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 29 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
30 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" | 30 #include "chrome/browser/ui/web_contents_modal_dialog_manager.h" |
31 #include "chrome/common/chrome_notification_types.h" | 31 #include "chrome/common/chrome_notification_types.h" |
32 #include "chrome/common/url_constants.h" | 32 #include "chrome/common/url_constants.h" |
33 #include "chrome/test/base/ui_test_utils.h" | 33 #include "chrome/test/base/ui_test_utils.h" |
34 #include "content/public/browser/devtools_agent_host.h" | 34 #include "content/public/browser/devtools_agent_host.h" |
35 #include "content/public/browser/render_process_host.h" | 35 #include "content/public/browser/render_process_host.h" |
| 36 #include "content/public/browser/render_widget_host_view.h" |
| 37 #include "content/public/browser/web_contents_view.h" |
36 #include "content/public/browser/web_intents_dispatcher.h" | 38 #include "content/public/browser/web_intents_dispatcher.h" |
37 #include "content/public/test/test_utils.h" | 39 #include "content/public/test/test_utils.h" |
38 #include "googleurl/src/gurl.h" | 40 #include "googleurl/src/gurl.h" |
39 #include "webkit/glue/web_intent_data.h" | 41 #include "webkit/glue/web_intent_data.h" |
40 | 42 |
41 using content::WebContents; | 43 using content::WebContents; |
42 | 44 |
43 namespace extensions { | 45 namespace extensions { |
44 | 46 |
45 namespace { | 47 namespace { |
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); | 928 ASSERT_TRUE(launched_listener.WaitUntilSatisfied()); |
927 } | 929 } |
928 | 930 |
929 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) { | 931 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) { |
930 ExtensionApiTest::ResultCatcher result_catcher; | 932 ExtensionApiTest::ResultCatcher result_catcher; |
931 LoadAndLaunchPlatformApp("messaging/app2"); | 933 LoadAndLaunchPlatformApp("messaging/app2"); |
932 LoadAndLaunchPlatformApp("messaging/app1"); | 934 LoadAndLaunchPlatformApp("messaging/app1"); |
933 EXPECT_TRUE(result_catcher.GetNextResult()); | 935 EXPECT_TRUE(result_catcher.GetNextResult()); |
934 } | 936 } |
935 | 937 |
| 938 // TODO(jeremya): this doesn't work on GTK yet. See http://crbug.com/159450. |
| 939 #if defined(TOOLKIT_GTK) |
| 940 #define MAYBE_WebContentsHasFocus DISABLED_WebContentsHasFocus |
| 941 #else |
| 942 #define MAYBE_WebContentsHasFocus WebContentsHasFocus |
| 943 #endif |
| 944 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_WebContentsHasFocus) { |
| 945 const Extension* extension = LoadAndLaunchPlatformApp("minimal"); |
| 946 ShellWindow* window = CreateShellWindow(extension); |
| 947 EXPECT_TRUE(window->web_contents()->GetRenderWidgetHostView()->HasFocus()); |
| 948 CloseShellWindow(window); |
| 949 } |
| 950 |
936 } // namespace extensions | 951 } // namespace extensions |
OLD | NEW |