summaryrefslogtreecommitdiffstats
path: root/content/gpu/gpu_info_collector_unittest.cc
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-14 20:05:47 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-14 20:05:47 +0000
commit6cc8ece6614023a11359a3504bcf76104ba6ba61 (patch)
tree95cd3ec77cfe989c121fd98f2fa31fbde3eec6ae /content/gpu/gpu_info_collector_unittest.cc
parentb3b9b508b81bd690d4f8ec1cdc4b53d7e6db08a1 (diff)
downloadchromium_src-6cc8ece6614023a11359a3504bcf76104ba6ba61.zip
chromium_src-6cc8ece6614023a11359a3504bcf76104ba6ba61.tar.gz
chromium_src-6cc8ece6614023a11359a3504bcf76104ba6ba61.tar.bz2
Refactoring GPUInfo: 1) remove the level field; instead, having a finalized field indicating if more info might be collected. 2) change version data from uint32 to string.
Refactoring GpuDataManager: 1) remove GpuFeatureAllowed() because we expose un-filtered flags through GpuFeatureFlags(). 2) disallow launch GPU process to collect gpu info if accelerated_compositing is not allowed. BUG=none TEST=unittest Review URL: http://codereview.chromium.org/6672004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu/gpu_info_collector_unittest.cc')
-rw-r--r--content/gpu/gpu_info_collector_unittest.cc49
1 files changed, 24 insertions, 25 deletions
diff --git a/content/gpu/gpu_info_collector_unittest.cc b/content/gpu/gpu_info_collector_unittest.cc
index a441484..1cc4b64 100644
--- a/content/gpu/gpu_info_collector_unittest.cc
+++ b/content/gpu/gpu_info_collector_unittest.cc
@@ -27,8 +27,8 @@ class GPUInfoCollectorTest : public testing::Test {
const uint32 device_id = 0x0658;
const char* driver_vendor = ""; // not implemented
const char* driver_version = "";
- const uint32 shader_version = 0x00000128;
- const uint32 gl_version = 0x00000301;
+ const char* shader_version = "1.40";
+ const char* gl_version = "3.1";
const char* gl_renderer = "Quadro FX 380/PCI/SSE2";
const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "3.1.0";
@@ -41,8 +41,8 @@ class GPUInfoCollectorTest : public testing::Test {
const uint32 device_id = 0x0640;
const char* driver_vendor = ""; // not implemented
const char* driver_version = "1.6.18";
- const uint32 shader_version = 0x00000114;
- const uint32 gl_version = 0x00000201;
+ const char* shader_version = "1.20";
+ const char* gl_version = "2.1";
const char* gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "2.1 NVIDIA-1.6.18";
@@ -55,8 +55,8 @@ class GPUInfoCollectorTest : public testing::Test {
const uint32 device_id = 0x0658;
const char* driver_vendor = "NVIDIA";
const char* driver_version = "195.36.24";
- const uint32 shader_version = 0x00000132;
- const uint32 gl_version = 0x00000302;
+ const char* shader_version = "1.50";
+ const char* gl_version = "3.2";
const char* gl_renderer = "Quadro FX 380/PCI/SSE2";
const char* gl_vendor = "NVIDIA Corporation";
const char* gl_version_string = "3.2.0 NVIDIA 195.36.24";
@@ -69,7 +69,6 @@ class GPUInfoCollectorTest : public testing::Test {
test_values_.device_id = device_id;
test_values_.driver_vendor = driver_vendor;
test_values_.driver_version =driver_version;
- test_values_.driver_date = "";
test_values_.pixel_shader_version = shader_version;
test_values_.vertex_shader_version = shader_version;
test_values_.gl_version = gl_version;
@@ -113,8 +112,8 @@ class GPUInfoCollectorTest : public testing::Test {
TEST_F(GPUInfoCollectorTest, DriverVendorGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- std::string driver_vendor = gpu_info.driver_vendor;
- EXPECT_EQ(test_values_.driver_vendor, driver_vendor);
+ EXPECT_EQ(test_values_.driver_vendor,
+ gpu_info.driver_vendor);
}
// Skip Windows because the driver version is obtained from bot registry.
@@ -122,56 +121,56 @@ TEST_F(GPUInfoCollectorTest, DriverVendorGL) {
TEST_F(GPUInfoCollectorTest, DriverVersionGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- std::string driver_version = gpu_info.driver_version;
- EXPECT_EQ(test_values_.driver_version, driver_version);
+ EXPECT_EQ(test_values_.driver_version,
+ gpu_info.driver_version);
}
#endif
TEST_F(GPUInfoCollectorTest, PixelShaderVersionGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- uint32 ps_version = gpu_info.pixel_shader_version;
- EXPECT_EQ(test_values_.pixel_shader_version, ps_version);
+ EXPECT_EQ(test_values_.pixel_shader_version,
+ gpu_info.pixel_shader_version);
}
TEST_F(GPUInfoCollectorTest, VertexShaderVersionGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- uint32 vs_version = gpu_info.vertex_shader_version;
- EXPECT_EQ(test_values_.vertex_shader_version, vs_version);
+ EXPECT_EQ(test_values_.vertex_shader_version,
+ gpu_info.vertex_shader_version);
}
TEST_F(GPUInfoCollectorTest, GLVersionGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- uint32 gl_version = gpu_info.gl_version;
- EXPECT_EQ(test_values_.gl_version, gl_version);
+ EXPECT_EQ(test_values_.gl_version,
+ gpu_info.gl_version);
}
TEST_F(GPUInfoCollectorTest, GLVersionStringGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- std::string gl_version_string = gpu_info.gl_version_string;
- EXPECT_EQ(test_values_.gl_version_string, gl_version_string);
+ EXPECT_EQ(test_values_.gl_version_string,
+ gpu_info.gl_version_string);
}
TEST_F(GPUInfoCollectorTest, GLRendererGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- std::string gl_renderer = gpu_info.gl_renderer;
- EXPECT_EQ(test_values_.gl_renderer, gl_renderer);
+ EXPECT_EQ(test_values_.gl_renderer,
+ gpu_info.gl_renderer);
}
TEST_F(GPUInfoCollectorTest, GLVendorGL) {
GPUInfo gpu_info;
gpu_info_collector::CollectGraphicsInfoGL(&gpu_info);
- std::string gl_vendor = gpu_info.gl_vendor;
- EXPECT_EQ(test_values_.gl_vendor, gl_vendor);
+ EXPECT_EQ(test_values_.gl_vendor,
+ gpu_info.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);
+ EXPECT_EQ(test_values_.gl_extensions,
+ gpu_info.gl_extensions);
}