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

Unified Diff: gpu/config/gpu_control_list_entry_unittest.cc

Issue 2379153002: GpuControlListEntry might need more info for gl_version as well (Closed)
Patch Set: Rebase Created 4 years, 2 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 | « gpu/config/gpu_control_list.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
{
« no previous file with comments | « gpu/config/gpu_control_list.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698