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

Side by Side Diff: content/renderer/render_thread_impl_browsertest.cc

Issue 1880343002: Use a token to initialise ChannelMojo and MojoApplication everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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 | « content/content_common.gypi ('k') | content/test/render_thread_impl_browser_test_ipc_helper.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 cmd->AppendSwitchASCII(switches::kContentImageTextureTarget, image_targets); 176 cmd->AppendSwitchASCII(switches::kContentImageTextureTarget, image_targets);
177 177
178 std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler = 178 std::unique_ptr<scheduler::RendererScheduler> renderer_scheduler =
179 scheduler::RendererScheduler::Create(); 179 scheduler::RendererScheduler::Create();
180 InitializeMojo(); 180 InitializeMojo();
181 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter( 181 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter(
182 test_task_counter_.get()); 182 test_task_counter_.get());
183 thread_ = new RenderThreadImplForTest( 183 thread_ = new RenderThreadImplForTest(
184 InProcessChildThreadParams(test_helper_->GetChannelId(), 184 InProcessChildThreadParams(test_helper_->GetChannelId(),
185 test_helper_->GetIOTaskRunner(), 185 test_helper_->GetIOTaskRunner(),
186 test_helper_->GetMessagePipeHandle()), 186 test_helper_->GetMojoIpcToken(),
187 test_helper_->GetMojoApplicationToken()),
187 std::move(renderer_scheduler), test_task_counter); 188 std::move(renderer_scheduler), test_task_counter);
188 cmd->InitFromArgv(old_argv); 189 cmd->InitFromArgv(old_argv);
189 190
190 test_msg_filter_ = make_scoped_refptr( 191 test_msg_filter_ = make_scoped_refptr(
191 new QuitOnTestMsgFilter(test_helper_->GetMessageLoop())); 192 new QuitOnTestMsgFilter(test_helper_->GetMessageLoop()));
192 thread_->AddFilter(test_msg_filter_.get()); 193 thread_->AddFilter(test_msg_filter_.get());
193 } 194 }
194 195
195 scoped_refptr<TestTaskCounter> test_task_counter_; 196 scoped_refptr<TestTaskCounter> test_task_counter_;
196 std::unique_ptr<ContentClient> content_client_; 197 std::unique_ptr<ContentClient> content_client_;
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); 237 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, ""));
237 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); 238 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop());
238 239
239 test_helper_->GetMessageLoop()->Run(); 240 test_helper_->GetMessageLoop()->Run();
240 241
241 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); 242 EXPECT_EQ(0, test_task_counter_->NumTasksPosted());
242 } 243 }
243 244
244 } // namespace 245 } // namespace
245 } // namespace content 246 } // namespace content
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/test/render_thread_impl_browser_test_ipc_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698