Index: chrome/gpu/gpu_info_collector_unittest.cc |
=================================================================== |
--- chrome/gpu/gpu_info_collector_unittest.cc (revision 72186) |
+++ chrome/gpu/gpu_info_collector_unittest.cc (working copy) |
@@ -33,6 +33,9 @@ |
const char* gl_vendor = "NVIDIA Corporation"; |
const char* gl_version_string = "3.1.0"; |
const char* gl_shading_language_version = "1.40 NVIDIA via Cg compiler"; |
+ const char* gl_extensions = |
+ "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " |
+ "GL_EXT_read_format_bgra"; |
#elif defined(OS_MACOSX) |
const uint32 vendor_id = 0x10de; |
const uint32 device_id = 0x0640; |
@@ -44,6 +47,9 @@ |
const char* gl_vendor = "NVIDIA Corporation"; |
const char* gl_version_string = "2.1 NVIDIA-1.6.18"; |
const char* gl_shading_language_version = "1.20 "; |
+ const char* gl_extensions = |
+ "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " |
+ "GL_EXT_read_format_bgra"; |
#else // defined (OS_LINUX) |
const uint32 vendor_id = 0x10de; |
const uint32 device_id = 0x0658; |
@@ -55,6 +61,9 @@ |
const char* gl_vendor = "NVIDIA Corporation"; |
const char* gl_version_string = "3.2.0 NVIDIA 195.36.24"; |
const char* gl_shading_language_version = "1.50 NVIDIA via Cg compiler"; |
+ const char* gl_extensions = |
+ "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " |
+ "GL_EXT_read_format_bgra"; |
#endif |
test_values_.SetVideoCardInfo(vendor_id, device_id); |
test_values_.SetDriverInfo(driver_vendor, driver_version); |
@@ -63,12 +72,12 @@ |
test_values_.SetGLRenderer(gl_renderer); |
test_values_.SetGLVendor(gl_vendor); |
test_values_.SetGLVersionString(gl_version_string); |
+ test_values_.SetGLExtensions(gl_extensions); |
test_values_.SetCanLoseContext(false); |
EXPECT_CALL(*gl_, GetString(GL_EXTENSIONS)) |
.WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( |
- "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " |
- "GL_EXT_read_format_bgra"))); |
+ gl_extensions))); |
EXPECT_CALL(*gl_, GetString(GL_SHADING_LANGUAGE_VERSION)) |
.WillRepeatedly(Return(reinterpret_cast<const GLubyte*>( |
gl_shading_language_version))); |
@@ -153,3 +162,11 @@ |
EXPECT_EQ(test_values_.gl_vendor(), gl_vendor); |
} |
+TEST_F(GPUInfoCollectorTest, GLExtensionsGL) { |
+ GPUInfo gpu_info; |
+ gpu_info_collector::CollectGraphicsInfoGL(&gpu_info); |
+ std::string gl_extensions = gpu_info.gl_extensions(); |
+ EXPECT_EQ(test_values_.gl_extensions(), gl_extensions); |
+} |
+ |
+ |