| 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_->GetMojoIpcToken(), | 186 test_helper_->GetMessagePipeHandle()), |
| 187 test_helper_->GetMojoApplicationToken()), | |
| 188 std::move(renderer_scheduler), test_task_counter); | 187 std::move(renderer_scheduler), test_task_counter); |
| 189 cmd->InitFromArgv(old_argv); | 188 cmd->InitFromArgv(old_argv); |
| 190 | 189 |
| 191 test_msg_filter_ = make_scoped_refptr( | 190 test_msg_filter_ = make_scoped_refptr( |
| 192 new QuitOnTestMsgFilter(test_helper_->GetMessageLoop())); | 191 new QuitOnTestMsgFilter(test_helper_->GetMessageLoop())); |
| 193 thread_->AddFilter(test_msg_filter_.get()); | 192 thread_->AddFilter(test_msg_filter_.get()); |
| 194 } | 193 } |
| 195 | 194 |
| 196 scoped_refptr<TestTaskCounter> test_task_counter_; | 195 scoped_refptr<TestTaskCounter> test_task_counter_; |
| 197 std::unique_ptr<ContentClient> content_client_; | 196 std::unique_ptr<ContentClient> content_client_; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); | 236 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); |
| 238 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); | 237 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); |
| 239 | 238 |
| 240 test_helper_->GetMessageLoop()->Run(); | 239 test_helper_->GetMessageLoop()->Run(); |
| 241 | 240 |
| 242 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); | 241 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); |
| 243 } | 242 } |
| 244 | 243 |
| 245 } // namespace | 244 } // namespace |
| 246 } // namespace content | 245 } // namespace content |
| OLD | NEW |