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

Side by Side Diff: content/browser/gpu/gpu_ipc_browsertests.cc

Issue 503253003: Remove implicit conversions from scoped_refptr to T* in content/*/gpu/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/command_line.h" 5 #include "base/command_line.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "content/browser/gpu/browser_gpu_channel_host_factory.h" 7 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
8 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 8 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
9 #include "content/common/gpu/client/context_provider_command_buffer.h" 9 #include "content/common/gpu/client/context_provider_command_buffer.h"
10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 10 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 DCHECK(!IsChannelEstablished()); 154 DCHECK(!IsChannelEstablished());
155 scoped_refptr<GpuChannelHost> gpu_channel = 155 scoped_refptr<GpuChannelHost> gpu_channel =
156 GetFactory()->EstablishGpuChannelSync(kInitCause); 156 GetFactory()->EstablishGpuChannelSync(kInitCause);
157 157
158 // Expect established callback immediately. 158 // Expect established callback immediately.
159 bool event = false; 159 bool event = false;
160 GetFactory()->EstablishGpuChannel( 160 GetFactory()->EstablishGpuChannel(
161 kInitCause, 161 kInitCause,
162 base::Bind(&BrowserGpuChannelHostFactoryTest::Signal, &event)); 162 base::Bind(&BrowserGpuChannelHostFactoryTest::Signal, &event));
163 EXPECT_TRUE(event); 163 EXPECT_TRUE(event);
164 EXPECT_EQ(gpu_channel, GetGpuChannel()); 164 EXPECT_EQ(gpu_channel.get(), GetGpuChannel());
165 } 165 }
166 166
167 // Fails since UI Compositor establishes a GpuChannel. 167 // Fails since UI Compositor establishes a GpuChannel.
168 IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest, 168 IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
169 DISABLED_CrashAndRecover) { 169 DISABLED_CrashAndRecover) {
170 DCHECK(!IsChannelEstablished()); 170 DCHECK(!IsChannelEstablished());
171 EstablishAndWait(); 171 EstablishAndWait();
172 scoped_refptr<GpuChannelHost> host = GetGpuChannel(); 172 scoped_refptr<GpuChannelHost> host = GetGpuChannel();
173 173
174 scoped_refptr<ContextProviderCommandBuffer> provider = 174 scoped_refptr<ContextProviderCommandBuffer> provider =
(...skipping 11 matching lines...) Expand all
186 shim->SimulateCrash(); 186 shim->SimulateCrash();
187 run_loop.Run(); 187 run_loop.Run();
188 188
189 EXPECT_EQ(1, counter); 189 EXPECT_EQ(1, counter);
190 EXPECT_FALSE(IsChannelEstablished()); 190 EXPECT_FALSE(IsChannelEstablished());
191 EstablishAndWait(); 191 EstablishAndWait();
192 EXPECT_TRUE(IsChannelEstablished()); 192 EXPECT_TRUE(IsChannelEstablished());
193 } 193 }
194 194
195 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/browser_gpu_channel_host_factory.cc ('k') | content/browser/gpu/shader_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698