| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) | 370 #if !defined(OS_IOS) |
| 371 InitializeMojo(); | 371 InitializeMojo(); |
| 372 if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) { | 372 test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); |
| 373 test_io_thread_.reset(new base::TestIOThread( | 373 ipc_support_.reset( |
| 374 base::TestIOThread::kAutoStart)); | 374 new mojo::edk::test::ScopedIPCSupport(test_io_thread_->task_runner())); |
| 375 ipc_support_.reset(new mojo::test::ScopedIPCSupport( | |
| 376 test_io_thread_->task_runner())); | |
| 377 } | |
| 378 #endif | 375 #endif |
| 379 | 376 |
| 380 // This needs to pass the mock render thread to the view. | 377 // This needs to pass the mock render thread to the view. |
| 381 RenderViewImpl* view = | 378 RenderViewImpl* view = |
| 382 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); | 379 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); |
| 383 view_ = view; | 380 view_ = view; |
| 384 } | 381 } |
| 385 | 382 |
| 386 void RenderViewTest::TearDown() { | 383 void RenderViewTest::TearDown() { |
| 387 // Run the loop so the release task from the renderwidget executes. | 384 // Run the loop so the release task from the renderwidget executes. |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 TestRenderFrame* frame = | 715 TestRenderFrame* frame = |
| 719 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 716 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 720 frame->Navigate(common_params, StartNavigationParams(), request_params); | 717 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 721 | 718 |
| 722 // The load actually happens asynchronously, so we pump messages to process | 719 // The load actually happens asynchronously, so we pump messages to process |
| 723 // the pending continuation. | 720 // the pending continuation. |
| 724 FrameLoadWaiter(frame).Wait(); | 721 FrameLoadWaiter(frame).Wait(); |
| 725 } | 722 } |
| 726 | 723 |
| 727 } // namespace content | 724 } // namespace content |
| OLD | NEW |