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