| 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 #include <queue> | 5 #include <queue> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 884 // platform_app for this test. | 884 // platform_app for this test. |
| 885 LoadAppWithGuest("web_view/visibility_changed"); | 885 LoadAppWithGuest("web_view/visibility_changed"); |
| 886 | 886 |
| 887 ExtensionTestMessageListener launched_again_listener("WebViewTest.LAUNCHED", | 887 ExtensionTestMessageListener launched_again_listener("WebViewTest.LAUNCHED", |
| 888 false); | 888 false); |
| 889 GetEmbedderWebContents()->GetController().Reload(false); | 889 GetEmbedderWebContents()->GetController().Reload(false); |
| 890 ASSERT_TRUE(launched_again_listener.WaitUntilSatisfied()); | 890 ASSERT_TRUE(launched_again_listener.WaitUntilSatisfied()); |
| 891 } | 891 } |
| 892 | 892 |
| 893 IN_PROC_BROWSER_TEST_P(WebViewTest, AcceptTouchEvents) { | 893 IN_PROC_BROWSER_TEST_P(WebViewTest, AcceptTouchEvents) { |
| 894 // TODO(lfg): Fix touch events for OOPIF-based webview. | 894 // This test only makes sense for non-OOPIF WebView, since with |
| 895 // https://crbug.com/581892 | 895 // UseCrossProcessFramesForGuests() events are routed directly to the |
| 896 // guest, so the embedder does not need to know about the installation of |
| 897 // touch handlers. |
| 896 if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) | 898 if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) |
| 897 return; | 899 return; |
| 898 | 900 |
| 899 LoadAppWithGuest("web_view/accept_touch_events"); | 901 LoadAppWithGuest("web_view/accept_touch_events"); |
| 900 | 902 |
| 901 content::RenderViewHost* embedder_rvh = | 903 content::RenderViewHost* embedder_rvh = |
| 902 GetEmbedderWebContents()->GetRenderViewHost(); | 904 GetEmbedderWebContents()->GetRenderViewHost(); |
| 903 | 905 |
| 904 bool embedder_has_touch_handler = | 906 bool embedder_has_touch_handler = |
| 905 content::RenderViewHostTester::HasTouchEventHandler(embedder_rvh); | 907 content::RenderViewHostTester::HasTouchEventHandler(embedder_rvh); |
| (...skipping 2209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3115 // 4 tasks expected. The order is arbitrary. | 3117 // 4 tasks expected. The order is arbitrary. |
| 3116 // Tab: about:blank, | 3118 // Tab: about:blank, |
| 3117 // Background Page: <webview> task manager test, | 3119 // Background Page: <webview> task manager test, |
| 3118 // App: <webview> task manager test, | 3120 // App: <webview> task manager test, |
| 3119 // Webview: WebViewed test content. | 3121 // Webview: WebViewed test content. |
| 3120 EXPECT_EQ(4U, task_manager.tasks().size()); | 3122 EXPECT_EQ(4U, task_manager.tasks().size()); |
| 3121 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 3123 EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); |
| 3122 } | 3124 } |
| 3123 | 3125 |
| 3124 #endif // defined(ENABLE_TASK_MANAGER) | 3126 #endif // defined(ENABLE_TASK_MANAGER) |
| OLD | NEW |