| 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 | 158 |
| 159 test_helper_.reset(new RenderThreadImplBrowserIPCTestHelper()); | 159 test_helper_.reset(new RenderThreadImplBrowserIPCTestHelper()); |
| 160 | 160 |
| 161 mock_process_.reset(new MockRenderProcess); | 161 mock_process_.reset(new MockRenderProcess); |
| 162 test_task_counter_ = make_scoped_refptr(new TestTaskCounter()); | 162 test_task_counter_ = make_scoped_refptr(new TestTaskCounter()); |
| 163 | 163 |
| 164 // RenderThreadImpl expects the browser to pass these flags. | 164 // RenderThreadImpl expects the browser to pass these flags. |
| 165 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 165 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 166 base::CommandLine::StringVector old_argv = cmd->argv(); | 166 base::CommandLine::StringVector old_argv = cmd->argv(); |
| 167 | 167 |
| 168 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); | 168 cmd->AppendSwitchASCII(switches::kNumCategorizedWorkerThreads, "1"); |
| 169 std::string image_targets; | 169 std::string image_targets; |
| 170 for (size_t format = 0; | 170 for (size_t format = 0; |
| 171 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { | 171 format < static_cast<size_t>(gfx::BufferFormat::LAST) + 1; format++) { |
| 172 if (!image_targets.empty()) | 172 if (!image_targets.empty()) |
| 173 image_targets += ","; | 173 image_targets += ","; |
| 174 image_targets += base::UintToString(GL_TEXTURE_2D); | 174 image_targets += base::UintToString(GL_TEXTURE_2D); |
| 175 } | 175 } |
| 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 = |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); | 237 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); |
| 238 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); | 238 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); |
| 239 | 239 |
| 240 test_helper_->GetMessageLoop()->Run(); | 240 test_helper_->GetMessageLoop()->Run(); |
| 241 | 241 |
| 242 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); | 242 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); |
| 243 } | 243 } |
| 244 | 244 |
| 245 } // namespace | 245 } // namespace |
| 246 } // namespace content | 246 } // namespace content |
| OLD | NEW |