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

Unified Diff: content/browser/gpu/gpu_util_unittest.cc

Issue 10915219: Add capability for GPU blacklist to manage GPU switching. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
Index: content/browser/gpu/gpu_util_unittest.cc
===================================================================
--- content/browser/gpu/gpu_util_unittest.cc (revision 156195)
+++ content/browser/gpu/gpu_util_unittest.cc (working copy)
@@ -85,3 +85,16 @@
content::GPU_FEATURE_TYPE_ALL)).c_str(),
"all");
}
+
+TEST(GpuUtilsTest, GpuSwitchingOptionFromString) {
+ // Test StringToGpuSwitchingOption.
+ EXPECT_EQ(gpu_util::StringToGpuSwitchingOption("automatic"),
+ content::GPU_SWITCHING_AUTOMATIC);
+ EXPECT_EQ(gpu_util::StringToGpuSwitchingOption("force_discrete"),
+ content::GPU_SWITCHING_FORCE_DISCRETE);
+ EXPECT_EQ(gpu_util::StringToGpuSwitchingOption("force_integrated"),
+ content::GPU_SWITCHING_FORCE_INTEGRATED);
+ EXPECT_EQ(gpu_util::StringToGpuSwitchingOption("xxx"),
+ content::GPU_SWITCHING_UNKNOWN);
+}
+

Powered by Google App Engine
This is Rietveld 408576698