Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: content/public/test/render_view_test.cc

Issue 2775483003: Use public Service Manager Connector API in Blink (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 blink::scheduler::RendererScheduler* scheduler) 121 blink::scheduler::RendererScheduler* scheduler)
122 : RendererBlinkPlatformImpl(scheduler, nullptr) {} 122 : RendererBlinkPlatformImpl(scheduler, nullptr) {}
123 123
124 // Get rid of the dependency to the sandbox, which is not available in 124 // Get rid of the dependency to the sandbox, which is not available in
125 // RenderViewTest. 125 // RenderViewTest.
126 blink::WebSandboxSupport* sandboxSupport() override { return NULL; } 126 blink::WebSandboxSupport* sandboxSupport() override { return NULL; }
127 }; 127 };
128 128
129 RenderViewTest::RendererBlinkPlatformImplTestOverride:: 129 RenderViewTest::RendererBlinkPlatformImplTestOverride::
130 RendererBlinkPlatformImplTestOverride() { 130 RendererBlinkPlatformImplTestOverride() {
131 InitializeMojo();
131 renderer_scheduler_ = blink::scheduler::RendererScheduler::Create(); 132 renderer_scheduler_ = blink::scheduler::RendererScheduler::Create();
132 blink_platform_impl_.reset( 133 blink_platform_impl_.reset(
133 new RendererBlinkPlatformImplTestOverrideImpl(renderer_scheduler_.get())); 134 new RendererBlinkPlatformImplTestOverrideImpl(renderer_scheduler_.get()));
134 } 135 }
135 136
136 RenderViewTest::RendererBlinkPlatformImplTestOverride:: 137 RenderViewTest::RendererBlinkPlatformImplTestOverride::
137 ~RendererBlinkPlatformImplTestOverride() { 138 ~RendererBlinkPlatformImplTestOverride() {
138 } 139 }
139 140
140 blink::Platform* 141 blink::Platform*
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 221
221 void RenderViewTest::GoBack(const GURL& url, const PageState& state) { 222 void RenderViewTest::GoBack(const GURL& url, const PageState& state) {
222 GoToOffset(-1, url, state); 223 GoToOffset(-1, url, state);
223 } 224 }
224 225
225 void RenderViewTest::GoForward(const GURL& url, const PageState& state) { 226 void RenderViewTest::GoForward(const GURL& url, const PageState& state) {
226 GoToOffset(1, url, state); 227 GoToOffset(1, url, state);
227 } 228 }
228 229
229 void RenderViewTest::SetUp() { 230 void RenderViewTest::SetUp() {
230 // Initialize mojo firstly to enable Blink initialization to use it.
231 InitializeMojo();
232 test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart)); 231 test_io_thread_.reset(new base::TestIOThread(base::TestIOThread::kAutoStart));
233 ipc_support_.reset(new mojo::edk::ScopedIPCSupport( 232 ipc_support_.reset(new mojo::edk::ScopedIPCSupport(
234 test_io_thread_->task_runner(), 233 test_io_thread_->task_runner(),
235 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST)); 234 mojo::edk::ScopedIPCSupport::ShutdownPolicy::FAST));
236 235
237 // Blink needs to be initialized before calling CreateContentRendererClient() 236 // Blink needs to be initialized before calling CreateContentRendererClient()
238 // because it uses blink internally. 237 // because it uses blink internally.
239 blink::initialize(blink_platform_impl_.Get()); 238 blink::initialize(blink_platform_impl_.Get());
240 239
241 content_client_.reset(CreateContentClient()); 240 content_client_.reset(CreateContentClient());
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 669 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
671 frame->Navigate(common_params, StartNavigationParams(), request_params); 670 frame->Navigate(common_params, StartNavigationParams(), request_params);
672 671
673 // The load actually happens asynchronously, so we pump messages to process 672 // The load actually happens asynchronously, so we pump messages to process
674 // the pending continuation. 673 // the pending continuation.
675 FrameLoadWaiter(frame).Wait(); 674 FrameLoadWaiter(frame).Wait();
676 view_->GetWebView()->updateAllLifecyclePhases(); 675 view_->GetWebView()->updateAllLifecyclePhases();
677 } 676 }
678 677
679 } // namespace content 678 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698