| 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/test/test_render_view_host.h" | 5 #include "content/test/test_render_view_host.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 } | 291 } |
| 292 | 292 |
| 293 WebPreferences TestRenderViewHost::TestComputeWebkitPrefs() { | 293 WebPreferences TestRenderViewHost::TestComputeWebkitPrefs() { |
| 294 return ComputeWebkitPrefs(); | 294 return ComputeWebkitPrefs(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void TestRenderViewHost::TestOnStartDragging( | 297 void TestRenderViewHost::TestOnStartDragging( |
| 298 const DropData& drop_data) { | 298 const DropData& drop_data) { |
| 299 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; | 299 blink::WebDragOperationsMask drag_operation = blink::WebDragOperationEvery; |
| 300 DragEventSourceInfo event_info; | 300 DragEventSourceInfo event_info; |
| 301 OnStartDragging(drop_data, drag_operation, SkBitmap(), gfx::Vector2d(), | 301 GetWidget()->OnStartDragging(drop_data, drag_operation, SkBitmap(), |
| 302 event_info); | 302 gfx::Vector2d(), event_info); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void TestRenderViewHost::TestOnUpdateStateWithFile( | 305 void TestRenderViewHost::TestOnUpdateStateWithFile( |
| 306 const base::FilePath& file_path) { | 306 const base::FilePath& file_path) { |
| 307 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"), | 307 PageState state = PageState::CreateForTesting(GURL("http://www.google.com"), |
| 308 false, "data", &file_path); | 308 false, "data", &file_path); |
| 309 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { | 309 if (SiteIsolationPolicy::UseSubframeNavigationEntries()) { |
| 310 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state); | 310 static_cast<RenderFrameHostImpl*>(GetMainFrame())->OnUpdateState(state); |
| 311 } else { | 311 } else { |
| 312 OnUpdateState(state); | 312 OnUpdateState(state); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 339 | 339 |
| 340 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { | 340 TestRenderFrameHost* RenderViewHostImplTestHarness::main_test_rfh() { |
| 341 return contents()->GetMainFrame(); | 341 return contents()->GetMainFrame(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 TestWebContents* RenderViewHostImplTestHarness::contents() { | 344 TestWebContents* RenderViewHostImplTestHarness::contents() { |
| 345 return static_cast<TestWebContents*>(web_contents()); | 345 return static_cast<TestWebContents*>(web_contents()); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace content | 348 } // namespace content |
| OLD | NEW |