| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 view_params.replicated_frame_state = FrameReplicationState(); | 360 view_params.replicated_frame_state = FrameReplicationState(); |
| 361 view_params.proxy_routing_id = MSG_ROUTING_NONE; | 361 view_params.proxy_routing_id = MSG_ROUTING_NONE; |
| 362 view_params.hidden = false; | 362 view_params.hidden = false; |
| 363 view_params.never_visible = false; | 363 view_params.never_visible = false; |
| 364 view_params.next_page_id = 1; | 364 view_params.next_page_id = 1; |
| 365 view_params.initial_size = *InitialSizeParams(); | 365 view_params.initial_size = *InitialSizeParams(); |
| 366 view_params.enable_auto_resize = false; | 366 view_params.enable_auto_resize = false; |
| 367 view_params.min_size = gfx::Size(); | 367 view_params.min_size = gfx::Size(); |
| 368 view_params.max_size = gfx::Size(); | 368 view_params.max_size = gfx::Size(); |
| 369 | 369 |
| 370 #if !defined(OS_IOS) | |
| 371 InitializeMojo(); | 370 InitializeMojo(); |
| 372 test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); | 371 test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); |
| 373 ipc_support_.reset( | 372 ipc_support_.reset( |
| 374 new mojo::edk::test::ScopedIPCSupport(test_io_thread_->task_runner())); | 373 new mojo::edk::test::ScopedIPCSupport(test_io_thread_->task_runner())); |
| 375 #endif | |
| 376 | 374 |
| 377 // This needs to pass the mock render thread to the view. | 375 // This needs to pass the mock render thread to the view. |
| 378 RenderViewImpl* view = | 376 RenderViewImpl* view = |
| 379 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); | 377 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); |
| 380 view_ = view; | 378 view_ = view; |
| 381 } | 379 } |
| 382 | 380 |
| 383 void RenderViewTest::TearDown() { | 381 void RenderViewTest::TearDown() { |
| 384 // Run the loop so the release task from the renderwidget executes. | 382 // Run the loop so the release task from the renderwidget executes. |
| 385 ProcessPendingMessages(); | 383 ProcessPendingMessages(); |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 TestRenderFrame* frame = | 720 TestRenderFrame* frame = |
| 723 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 721 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 724 frame->Navigate(common_params, StartNavigationParams(), request_params); | 722 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 725 | 723 |
| 726 // The load actually happens asynchronously, so we pump messages to process | 724 // The load actually happens asynchronously, so we pump messages to process |
| 727 // the pending continuation. | 725 // the pending continuation. |
| 728 FrameLoadWaiter(frame).Wait(); | 726 FrameLoadWaiter(frame).Wait(); |
| 729 } | 727 } |
| 730 | 728 |
| 731 } // namespace content | 729 } // namespace content |
| OLD | NEW |