| 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/public/test/render_view_test.h" | 5 #include "content/public/test/render_view_test.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cctype> | 9 #include <cctype> |
| 10 | 10 |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 view_params.replicated_frame_state = FrameReplicationState(); | 307 view_params.replicated_frame_state = FrameReplicationState(); |
| 308 view_params.proxy_routing_id = MSG_ROUTING_NONE; | 308 view_params.proxy_routing_id = MSG_ROUTING_NONE; |
| 309 view_params.hidden = false; | 309 view_params.hidden = false; |
| 310 view_params.never_visible = false; | 310 view_params.never_visible = false; |
| 311 view_params.initial_size = *InitialSizeParams(); | 311 view_params.initial_size = *InitialSizeParams(); |
| 312 view_params.enable_auto_resize = false; | 312 view_params.enable_auto_resize = false; |
| 313 view_params.min_size = gfx::Size(); | 313 view_params.min_size = gfx::Size(); |
| 314 view_params.max_size = gfx::Size(); | 314 view_params.max_size = gfx::Size(); |
| 315 | 315 |
| 316 // This needs to pass the mock render thread to the view. | 316 // This needs to pass the mock render thread to the view. |
| 317 RenderViewImpl* view = | 317 RenderViewImpl* view = RenderViewImpl::Create( |
| 318 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); | 318 compositor_deps_.get(), view_params, RenderWidget::ShowCallback()); |
| 319 view_ = view; | 319 view_ = view; |
| 320 } | 320 } |
| 321 | 321 |
| 322 void RenderViewTest::TearDown() { | 322 void RenderViewTest::TearDown() { |
| 323 // Run the loop so the release task from the renderwidget executes. | 323 // Run the loop so the release task from the renderwidget executes. |
| 324 ProcessPendingMessages(); | 324 ProcessPendingMessages(); |
| 325 | 325 |
| 326 render_thread_->SendCloseMessage(); | 326 render_thread_->SendCloseMessage(); |
| 327 | 327 |
| 328 std::unique_ptr<blink::WebLeakDetector> leak_detector = | 328 std::unique_ptr<blink::WebLeakDetector> leak_detector = |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 659 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 660 frame->Navigate(common_params, StartNavigationParams(), request_params); | 660 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 661 | 661 |
| 662 // The load actually happens asynchronously, so we pump messages to process | 662 // The load actually happens asynchronously, so we pump messages to process |
| 663 // the pending continuation. | 663 // the pending continuation. |
| 664 FrameLoadWaiter(frame).Wait(); | 664 FrameLoadWaiter(frame).Wait(); |
| 665 view_->GetWebView()->updateAllLifecyclePhases(); | 665 view_->GetWebView()->updateAllLifecyclePhases(); |
| 666 } | 666 } |
| 667 | 667 |
| 668 } // namespace content | 668 } // namespace content |
| OLD | NEW |