| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 view_params.hidden = false; | 286 view_params.hidden = false; |
| 287 view_params.never_visible = false; | 287 view_params.never_visible = false; |
| 288 view_params.next_page_id = 1; | 288 view_params.next_page_id = 1; |
| 289 view_params.initial_size = *InitialSizeParams(); | 289 view_params.initial_size = *InitialSizeParams(); |
| 290 view_params.enable_auto_resize = false; | 290 view_params.enable_auto_resize = false; |
| 291 view_params.min_size = gfx::Size(); | 291 view_params.min_size = gfx::Size(); |
| 292 view_params.max_size = gfx::Size(); | 292 view_params.max_size = gfx::Size(); |
| 293 | 293 |
| 294 #if !defined(OS_IOS) | 294 #if !defined(OS_IOS) |
| 295 InitializeMojo(); | 295 InitializeMojo(); |
| 296 if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) { | 296 test_io_thread_.reset(new base::TestIOThread( |
| 297 test_io_thread_.reset(new base::TestIOThread( | 297 base::TestIOThread::kAutoStart)); |
| 298 base::TestIOThread::kAutoStart)); | 298 ipc_support_.reset(new mojo::edk::test::ScopedIPCSupport( |
| 299 ipc_support_.reset(new mojo::test::ScopedIPCSupport( | 299 test_io_thread_->task_runner())); |
| 300 test_io_thread_->task_runner())); | |
| 301 } | |
| 302 #endif | 300 #endif |
| 303 | 301 |
| 304 // This needs to pass the mock render thread to the view. | 302 // This needs to pass the mock render thread to the view. |
| 305 RenderViewImpl* view = | 303 RenderViewImpl* view = |
| 306 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); | 304 RenderViewImpl::Create(compositor_deps_.get(), view_params, false); |
| 307 view_ = view; | 305 view_ = view; |
| 308 } | 306 } |
| 309 | 307 |
| 310 void RenderViewTest::TearDown() { | 308 void RenderViewTest::TearDown() { |
| 311 // Run the loop so the release task from the renderwidget executes. | 309 // Run the loop so the release task from the renderwidget executes. |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 TestRenderFrame* frame = | 638 TestRenderFrame* frame = |
| 641 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); | 639 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); |
| 642 frame->Navigate(common_params, StartNavigationParams(), request_params); | 640 frame->Navigate(common_params, StartNavigationParams(), request_params); |
| 643 | 641 |
| 644 // The load actually happens asynchronously, so we pump messages to process | 642 // The load actually happens asynchronously, so we pump messages to process |
| 645 // the pending continuation. | 643 // the pending continuation. |
| 646 FrameLoadWaiter(frame).Wait(); | 644 FrameLoadWaiter(frame).Wait(); |
| 647 } | 645 } |
| 648 | 646 |
| 649 } // namespace content | 647 } // namespace content |
| OLD | NEW |