| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |