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

Unified Diff: content/browser/gpu/gpu_ipc_browsertests.cc

Issue 2723363002: gpu: Replace GpuMsg_Finalize ipc with equivalent mojom api (Closed)
Patch Set: . Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_ipc_browsertests.cc
diff --git a/content/browser/gpu/gpu_ipc_browsertests.cc b/content/browser/gpu/gpu_ipc_browsertests.cc
index 458e847d7a713c267ccd00e4f189f45cdcc67694..492ad85bdc730ff3654ff948a7cc1ff5cd54f572 100644
--- a/content/browser/gpu/gpu_ipc_browsertests.cc
+++ b/content/browser/gpu/gpu_ipc_browsertests.cc
@@ -10,6 +10,7 @@
#include "content/browser/gpu/browser_gpu_channel_host_factory.h"
#include "content/browser/gpu/gpu_process_host.h"
#include "content/public/browser/gpu_data_manager.h"
+#include "content/public/browser/gpu_utils.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/content_browser_test.h"
#include "services/ui/gpu/interfaces/gpu_service.mojom.h"
@@ -284,9 +285,12 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
base::Bind(&BrowserGpuChannelHostFactoryTest::OnContextLost,
base::Unretained(this), run_loop.QuitClosure(), &counter));
EXPECT_TRUE(provider->BindToCurrentThread());
- GpuProcessHost::CallOnIO(
- GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED, false /* force_create */,
- base::Bind([](GpuProcessHost* host) { host->gpu_service()->Crash(); }));
+ GpuProcessHost::CallOnIO(GpuProcessHost::GPU_PROCESS_KIND_SANDBOXED,
+ false /* force_create */,
+ base::Bind([](GpuProcessHost* host) {
+ if (host)
+ host->gpu_service()->Crash();
+ }));
run_loop.Run();
EXPECT_EQ(1, counter);
@@ -295,4 +299,14 @@ IN_PROC_BROWSER_TEST_F(BrowserGpuChannelHostFactoryTest,
EXPECT_TRUE(IsChannelEstablished());
}
+using GpuProcessHostBrowserTest = BrowserGpuChannelHostFactoryTest;
+
+IN_PROC_BROWSER_TEST_F(GpuProcessHostBrowserTest, Shutdown) {
+ DCHECK(!IsChannelEstablished());
+ EstablishAndWait();
+ base::RunLoop run_loop;
+ StopGpuProcess(run_loop.QuitClosure());
+ run_loop.Run();
+}
+
} // namespace content
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698