| 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 "content/browser/web_contents/touch_editable_impl_aura.h" | 5 #include "content/browser/web_contents/touch_editable_impl_aura.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 // Starts the test server and navigates to the given url. Sets a large enough | 131 // Starts the test server and navigates to the given url. Sets a large enough |
| 132 // size to the root window. Returns after the navigation to the url is | 132 // size to the root window. Returns after the navigation to the url is |
| 133 // complete. | 133 // complete. |
| 134 void StartTestWithPage(const std::string& url) { | 134 void StartTestWithPage(const std::string& url) { |
| 135 ASSERT_TRUE(test_server()->Start()); | 135 ASSERT_TRUE(test_server()->Start()); |
| 136 GURL test_url(test_server()->GetURL(url)); | 136 GURL test_url(test_server()->GetURL(url)); |
| 137 NavigateToURL(shell(), test_url); | 137 NavigateToURL(shell(), test_url); |
| 138 aura::Window* content = | 138 aura::Window* content = |
| 139 shell()->web_contents()->GetView()->GetContentNativeView(); | 139 shell()->web_contents()->GetView()->GetContentNativeView(); |
| 140 content->GetDispatcher()->host()->SetBounds(gfx::Rect(800, 600)); | 140 content->GetHost()->SetBounds(gfx::Rect(800, 600)); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void TestTouchSelectionOriginatingFromWebpage() { | 143 void TestTouchSelectionOriginatingFromWebpage() { |
| 144 ASSERT_NO_FATAL_FAILURE( | 144 ASSERT_NO_FATAL_FAILURE( |
| 145 StartTestWithPage("files/touch_selection.html")); | 145 StartTestWithPage("files/touch_selection.html")); |
| 146 WebContentsImpl* web_contents = | 146 WebContentsImpl* web_contents = |
| 147 static_cast<WebContentsImpl*>(shell()->web_contents()); | 147 static_cast<WebContentsImpl*>(shell()->web_contents()); |
| 148 RenderViewHostImpl* view_host = static_cast<RenderViewHostImpl*>( | 148 RenderViewHostImpl* view_host = static_cast<RenderViewHostImpl*>( |
| 149 web_contents->GetRenderViewHost()); | 149 web_contents->GetRenderViewHost()); |
| 150 WebContentsViewAura* view_aura = static_cast<WebContentsViewAura*>( | 150 WebContentsViewAura* view_aura = static_cast<WebContentsViewAura*>( |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 TouchSelectionOnLongPressTest) { | 379 TouchSelectionOnLongPressTest) { |
| 380 TestTouchSelectionOnLongPress(); | 380 TestTouchSelectionOnLongPress(); |
| 381 } | 381 } |
| 382 | 382 |
| 383 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, | 383 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, |
| 384 TouchCursorInTextfieldTest) { | 384 TouchCursorInTextfieldTest) { |
| 385 TestTouchCursorInTextfield(); | 385 TestTouchCursorInTextfield(); |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace content | 388 } // namespace content |
| OLD | NEW |