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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 "GL_EXT_read_format_bgra"; | 120 "GL_EXT_read_format_bgra"; |
121 gl_shading_language_version_ = "1.40 NVIDIA via Cg compiler"; | 121 gl_shading_language_version_ = "1.40 NVIDIA via Cg compiler"; |
122 break; | 122 break; |
123 } | 123 } |
124 default: { | 124 default: { |
125 NOTREACHED(); | 125 NOTREACHED(); |
126 break; | 126 break; |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 test_values_.can_lose_context = false; | |
131 | |
132 EXPECT_CALL(*gl_, GetString(GL_VERSION)) | 130 EXPECT_CALL(*gl_, GetString(GL_VERSION)) |
133 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( | 131 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( |
134 test_values_.gl_version.c_str()))); | 132 test_values_.gl_version.c_str()))); |
135 | 133 |
136 // Now that that expectation is set up, we can call this helper function. | 134 // Now that that expectation is set up, we can call this helper function. |
137 if (gl::WillUseGLGetStringForExtensions()) { | 135 if (gl::WillUseGLGetStringForExtensions()) { |
138 EXPECT_CALL(*gl_, GetString(GL_EXTENSIONS)) | 136 EXPECT_CALL(*gl_, GetString(GL_EXTENSIONS)) |
139 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( | 137 .WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( |
140 test_values_.gl_extensions.c_str()))); | 138 test_values_.gl_extensions.c_str()))); |
141 } else { | 139 } else { |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 423 |
426 gpu_info.gl_vendor = "Google Corporation"; | 424 gpu_info.gl_vendor = "Google Corporation"; |
427 gpu_info.gl_renderer = "Chrome GPU Team"; | 425 gpu_info.gl_renderer = "Chrome GPU Team"; |
428 IdentifyActiveGPU(&gpu_info); | 426 IdentifyActiveGPU(&gpu_info); |
429 EXPECT_FALSE(gpu_info.gpu.active); | 427 EXPECT_FALSE(gpu_info.gpu.active); |
430 EXPECT_FALSE(gpu_info.secondary_gpus[0].active); | 428 EXPECT_FALSE(gpu_info.secondary_gpus[0].active); |
431 } | 429 } |
432 | 430 |
433 } // namespace gpu | 431 } // namespace gpu |
434 | 432 |
OLD | NEW |