Index: gpu/config/gpu_control_list_entry_unittest.cc |
diff --git a/gpu/config/gpu_control_list_entry_unittest.cc b/gpu/config/gpu_control_list_entry_unittest.cc |
index 9228b976ec16af2bab08cdd615b97e9e32e135fc..5287d4c845934a27e31d0cbc3939a818544260fa 100644 |
--- a/gpu/config/gpu_control_list_entry_unittest.cc |
+++ b/gpu/config/gpu_control_list_entry_unittest.cc |
@@ -799,6 +799,44 @@ TEST_F(GpuControlListEntryTest, NeedsMoreInfoForExceptionsEntry) { |
EXPECT_FALSE(entry->NeedsMoreInfo(gpu_info, true)); |
} |
+TEST_F(GpuControlListEntryTest, NeedsMoreInfoForGlVersionEntry) { |
+ const std::string json = LONG_STRING_CONST( |
+ { |
+ "id" : 1, |
+ "gl_type": "gl", |
+ "gl_version": { |
+ "op": "<", |
+ "value" : "3.5" |
+ }, |
+ "features" : [ |
+ "test_feature_1" |
+ ] |
+ } |
+ ); |
+ ScopedEntry entry(GetEntryFromString(json)); |
+ EXPECT_TRUE(entry.get() != NULL); |
+ |
+ GPUInfo gpu_info; |
+ EXPECT_TRUE(entry->NeedsMoreInfo(gpu_info, true)); |
+ EXPECT_TRUE( |
+ entry->Contains(GpuControlList::kOsUnknown, std::string(), gpu_info)); |
+ |
+ gpu_info.gl_version = "3.1 Mesa 11.1.0"; |
+ EXPECT_FALSE(entry->NeedsMoreInfo(gpu_info, false)); |
+ EXPECT_TRUE( |
+ entry->Contains(GpuControlList::kOsUnknown, std::string(), gpu_info)); |
+ |
+ gpu_info.gl_version = "4.1 Mesa 12.1.0"; |
+ EXPECT_FALSE(entry->NeedsMoreInfo(gpu_info, false)); |
+ EXPECT_FALSE( |
+ entry->Contains(GpuControlList::kOsUnknown, std::string(), gpu_info)); |
+ |
+ gpu_info.gl_version = "OpenGL ES 2.0 Mesa 12.1.0"; |
+ EXPECT_FALSE(entry->NeedsMoreInfo(gpu_info, false)); |
+ EXPECT_FALSE( |
+ entry->Contains(GpuControlList::kOsUnknown, std::string(), gpu_info)); |
+} |
+ |
TEST_F(GpuControlListEntryTest, FeatureTypeAllEntry) { |
const std::string json = LONG_STRING_CONST( |
{ |