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

Side by Side Diff: gpu/config/gpu_info_collector_unittest.cc

Issue 1859703002: convert //gpu to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 4 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 | « gpu/config/gpu_info_collector_mac.mm ('k') | gpu/config/gpu_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include <memory>
9
9 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
10 #include "gpu/config/gpu_info.h" 11 #include "gpu/config/gpu_info.h"
11 #include "gpu/config/gpu_info_collector.h" 12 #include "gpu/config/gpu_info_collector.h"
12 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
13 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
14 #include "ui/gl/gl_implementation.h" 15 #include "ui/gl/gl_implementation.h"
15 #include "ui/gl/gl_mock.h" 16 #include "ui/gl/gl_mock.h"
16 #include "ui/gl/test/gl_surface_test_support.h" 17 #include "ui/gl/test/gl_surface_test_support.h"
17 18
18 using ::gfx::MockGLInterface; 19 using ::gfx::MockGLInterface;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 void TearDown() override { 167 void TearDown() override {
167 ::gfx::MockGLInterface::SetGLInterface(NULL); 168 ::gfx::MockGLInterface::SetGLInterface(NULL);
168 gl_.reset(); 169 gl_.reset();
169 gfx::ClearGLBindings(); 170 gfx::ClearGLBindings();
170 171
171 testing::Test::TearDown(); 172 testing::Test::TearDown();
172 } 173 }
173 174
174 public: 175 public:
175 // Use StrictMock to make 100% sure we know how GL will be called. 176 // Use StrictMock to make 100% sure we know how GL will be called.
176 scoped_ptr< ::testing::StrictMock< ::gfx::MockGLInterface> > gl_; 177 std::unique_ptr<::testing::StrictMock<::gfx::MockGLInterface>> gl_;
177 GPUInfo test_values_; 178 GPUInfo test_values_;
178 const char* gl_shading_language_version_ = nullptr; 179 const char* gl_shading_language_version_ = nullptr;
179 180
180 // Persistent storage is needed for the split extension string. 181 // Persistent storage is needed for the split extension string.
181 std::vector<std::string> split_extensions_; 182 std::vector<std::string> split_extensions_;
182 }; 183 };
183 184
184 INSTANTIATE_TEST_CASE_P(GPUConfig, 185 INSTANTIATE_TEST_CASE_P(GPUConfig,
185 GPUInfoCollectorTest, 186 GPUInfoCollectorTest,
186 ::testing::ValuesIn(kMockedOperatingSystemKinds)); 187 ::testing::ValuesIn(kMockedOperatingSystemKinds));
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 353
353 gpu_info.gl_vendor = "Google Corporation"; 354 gpu_info.gl_vendor = "Google Corporation";
354 gpu_info.gl_renderer = "Chrome GPU Team"; 355 gpu_info.gl_renderer = "Chrome GPU Team";
355 IdentifyActiveGPU(&gpu_info); 356 IdentifyActiveGPU(&gpu_info);
356 EXPECT_FALSE(gpu_info.gpu.active); 357 EXPECT_FALSE(gpu_info.gpu.active);
357 EXPECT_FALSE(gpu_info.secondary_gpus[0].active); 358 EXPECT_FALSE(gpu_info.secondary_gpus[0].active);
358 } 359 }
359 360
360 } // namespace gpu 361 } // namespace gpu
361 362
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector_mac.mm ('k') | gpu/config/gpu_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698