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

Unified Diff: gpu/config/gpu_control_list_unittest.cc

Issue 503243002: In about:gpu page, make sure feature status and problem description match (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 6 years, 4 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_unittest.cc
diff --git a/gpu/config/gpu_control_list_unittest.cc b/gpu/config/gpu_control_list_unittest.cc
index 9ba06b897aa472cd3cf84ef1748faf36fbb9770a..856eb4ac02b1992209ac6732475f5f7c46ef66ca 100644
--- a/gpu/config/gpu_control_list_unittest.cc
+++ b/gpu/config/gpu_control_list_unittest.cc
@@ -289,6 +289,52 @@ TEST_F(GpuControlListTest, DisabledEntry) {
EXPECT_EQ(1u, flag_entries.size());
}
+TEST_F(GpuControlListTest, NeedsMoreInfo) {
+ const std::string json = LONG_STRING_CONST(
+ {
+ "name": "gpu control list",
+ "version": "0.1",
+ "entries": [
+ {
+ "id": 1,
+ "os": {
+ "type": "win"
+ },
+ "vendor_id": "0x10de",
+ "driver_version": {
+ "op": "<",
+ "value": "12"
+ },
+ "features": [
+ "test_feature_0"
+ ]
+ }
+ ]
+ }
+ );
+ GPUInfo gpu_info;
+ gpu_info.gpu.vendor_id = kNvidiaVendorId;
+
+ scoped_ptr<GpuControlList> control_list(Create());
+ EXPECT_TRUE(control_list->LoadList(json, GpuControlList::kAllOs));
+
+ std::set<int> features = control_list->MakeDecision(
+ GpuControlList::kOsWin, kOsVersion, gpu_info);
+ EXPECT_EMPTY_SET(features);
+ EXPECT_TRUE(control_list->needs_more_info());
+ std::vector<uint32> decision_entries;
+ control_list->GetDecisionEntries(&decision_entries, false);
+ EXPECT_EQ(0u, decision_entries.size());
+
+ gpu_info.driver_version = "11";
+ features = control_list->MakeDecision(
+ GpuControlList::kOsWin, kOsVersion, gpu_info);
+ EXPECT_SINGLE_FEATURE(features, TEST_FEATURE_0);
+ EXPECT_FALSE(control_list->needs_more_info());
+ control_list->GetDecisionEntries(&decision_entries, false);
+ EXPECT_EQ(1u, decision_entries.size());
+}
+
TEST_F(GpuControlListTest, NeedsMoreInfoForExceptions) {
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