| 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 2205 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3111   // 4 tasks expected. The order is arbitrary. | 3113   // 4 tasks expected. The order is arbitrary. | 
| 3112   // Tab: about:blank, | 3114   // Tab: about:blank, | 
| 3113   // Background Page: <webview> task manager test, | 3115   // Background Page: <webview> task manager test, | 
| 3114   // App: <webview> task manager test, | 3116   // App: <webview> task manager test, | 
| 3115   // Webview: WebViewed test content. | 3117   // Webview: WebViewed test content. | 
| 3116   EXPECT_EQ(4U, task_manager.tasks().size()); | 3118   EXPECT_EQ(4U, task_manager.tasks().size()); | 
| 3117   EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 3119   EXPECT_TRUE(HasExpectedGuestTask(task_manager, guest_contents)); | 
| 3118 } | 3120 } | 
| 3119 | 3121 | 
| 3120 #endif  // defined(ENABLE_TASK_MANAGER) | 3122 #endif  // defined(ENABLE_TASK_MANAGER) | 
| OLD | NEW | 
|---|