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

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

Issue 1139903005: Add PERSISTENT_MAP usage for GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: persistentmap: . Created 5 years, 7 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
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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/discardable_memory.h" 7 #include "base/memory/discardable_memory.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 test_helper_.reset(new RenderThreadImplBrowserIPCTestHelper()); 150 test_helper_.reset(new RenderThreadImplBrowserIPCTestHelper());
151 151
152 mock_process_.reset(new MockRenderProcess); 152 mock_process_.reset(new MockRenderProcess);
153 test_task_counter_ = make_scoped_refptr(new TestTaskCounter()); 153 test_task_counter_ = make_scoped_refptr(new TestTaskCounter());
154 154
155 // RenderThreadImpl expects the browser to pass these flags. 155 // RenderThreadImpl expects the browser to pass these flags.
156 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); 156 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess();
157 base::CommandLine::StringVector old_argv = cmd->argv(); 157 base::CommandLine::StringVector old_argv = cmd->argv();
158 158
159 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); 159 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1");
160 cmd->AppendSwitchASCII(switches::kUseImageTextureTarget, 160 cmd->AppendSwitchASCII(switches::kMapImageTextureTarget,
161 base::UintToString(GL_TEXTURE_2D));
162 cmd->AppendSwitchASCII(switches::kPersistentMapImageTextureTarget,
161 base::UintToString(GL_TEXTURE_2D)); 163 base::UintToString(GL_TEXTURE_2D));
162 164
163 thread_ = new RenderThreadImplForTest( 165 thread_ = new RenderThreadImplForTest(
164 InProcessChildThreadParams(test_helper_->GetChannelId(), 166 InProcessChildThreadParams(test_helper_->GetChannelId(),
165 test_helper_->GetIOTaskRunner()), 167 test_helper_->GetIOTaskRunner()),
166 test_task_counter_); 168 test_task_counter_);
167 cmd->InitFromArgv(old_argv); 169 cmd->InitFromArgv(old_argv);
168 170
169 thread_->EnsureWebKitInitialized(); 171 thread_->EnsureWebKitInitialized();
170 172
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, "")); 219 test_helper_->Sender()->Send(new WebSocketMsg_NotifyFailure(1, ""));
218 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop()); 220 test_helper_->Sender()->Send(new TestMsg_QuitRunLoop());
219 221
220 test_helper_->GetMessageLoop()->Run(); 222 test_helper_->GetMessageLoop()->Run();
221 223
222 EXPECT_EQ(0, test_task_counter_->NumTasksPosted()); 224 EXPECT_EQ(0, test_task_counter_->NumTasksPosted());
223 } 225 }
224 226
225 } // namespace 227 } // namespace
226 } // namespace content 228 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698