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

Side by Side Diff: services/ui/ws/gpu_host_unittest.cc

Issue 2781293003: gpu: Have GpuService create and own GpuMemoryBufferFactory. (Closed)
Patch Set: tot merge. Created 3 years, 8 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
« no previous file with comments | « services/ui/gpu/gpu_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "services/ui/ws/gpu_host.h" 5 #include "services/ui/ws/gpu_host.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 public: 46 public:
47 TestGpuService(); 47 TestGpuService();
48 ~TestGpuService() override {} 48 ~TestGpuService() override {}
49 49
50 private: 50 private:
51 DISALLOW_COPY_AND_ASSIGN(TestGpuService); 51 DISALLOW_COPY_AND_ASSIGN(TestGpuService);
52 }; 52 };
53 53
54 TestGpuService::TestGpuService() 54 TestGpuService::TestGpuService()
55 : GpuService(gpu::GPUInfo(), 55 : GpuService(gpu::GPUInfo(),
56 nullptr, 56 nullptr /* watchdog_thread */,
57 nullptr,
58 base::ThreadTaskRunnerHandle::Get(), 57 base::ThreadTaskRunnerHandle::Get(),
59 gpu::GpuFeatureInfo()) {} 58 gpu::GpuFeatureInfo()) {}
60 59
61 } // namespace 60 } // namespace
62 61
63 class GpuHostTest : public testing::Test { 62 class GpuHostTest : public testing::Test {
64 public: 63 public:
65 GpuHostTest() {} 64 GpuHostTest() {}
66 ~GpuHostTest() override {} 65 ~GpuHostTest() override {}
67 66
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 TEST_F(GpuHostTest, GpuClientDestructionOrder) { 110 TEST_F(GpuHostTest, GpuClientDestructionOrder) {
112 base::WeakPtr<GpuClient> client_ref = AddGpuClient(); 111 base::WeakPtr<GpuClient> client_ref = AddGpuClient();
113 EXPECT_NE(nullptr, client_ref); 112 EXPECT_NE(nullptr, client_ref);
114 DestroyHost(); 113 DestroyHost();
115 EXPECT_EQ(nullptr, client_ref); 114 EXPECT_EQ(nullptr, client_ref);
116 } 115 }
117 116
118 } // namespace test 117 } // namespace test
119 } // namespace ws 118 } // namespace ws
120 } // namespace ui 119 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/gpu/gpu_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698