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

Unified Diff: chrome/gpu/gpu_info_collector_unittest.cc

Issue 6279009: Collect GL_EXTENSIONS string in GPUInfo and display it in about:gpu page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/gpu/gpu_info_collector.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+}
+
+
« no previous file with comments | « chrome/gpu/gpu_info_collector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698