| OLD | NEW |
| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( | 159 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( |
| 160 test_values_.gl_renderer.c_str()))); | 160 test_values_.gl_renderer.c_str()))); |
| 161 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_SAMPLES, _)) | 161 EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_SAMPLES, _)) |
| 162 .WillOnce(SetArgPointee<1>(8)) | 162 .WillOnce(SetArgPointee<1>(8)) |
| 163 .RetiresOnSaturation(); | 163 .RetiresOnSaturation(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 void TearDown() override { | 166 void TearDown() override { |
| 167 ::gl::MockGLInterface::SetGLInterface(NULL); | 167 ::gl::MockGLInterface::SetGLInterface(NULL); |
| 168 gl_.reset(); | 168 gl_.reset(); |
| 169 gl::init::ClearGLBindings(); | 169 gl::init::ShutdownGL(); |
| 170 | 170 |
| 171 testing::Test::TearDown(); | 171 testing::Test::TearDown(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 public: | 174 public: |
| 175 // Use StrictMock to make 100% sure we know how GL will be called. | 175 // Use StrictMock to make 100% sure we know how GL will be called. |
| 176 std::unique_ptr<::testing::StrictMock<::gl::MockGLInterface>> gl_; | 176 std::unique_ptr<::testing::StrictMock<::gl::MockGLInterface>> gl_; |
| 177 GPUInfo test_values_; | 177 GPUInfo test_values_; |
| 178 const char* gl_shading_language_version_ = nullptr; | 178 const char* gl_shading_language_version_ = nullptr; |
| 179 | 179 |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 | 423 |
| 424 gpu_info.gl_vendor = "Google Corporation"; | 424 gpu_info.gl_vendor = "Google Corporation"; |
| 425 gpu_info.gl_renderer = "Chrome GPU Team"; | 425 gpu_info.gl_renderer = "Chrome GPU Team"; |
| 426 IdentifyActiveGPU(&gpu_info); | 426 IdentifyActiveGPU(&gpu_info); |
| 427 EXPECT_FALSE(gpu_info.gpu.active); | 427 EXPECT_FALSE(gpu_info.gpu.active); |
| 428 EXPECT_FALSE(gpu_info.secondary_gpus[0].active); | 428 EXPECT_FALSE(gpu_info.secondary_gpus[0].active); |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace gpu | 431 } // namespace gpu |
| 432 | 432 |
| OLD | NEW |