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

Unified Diff: chrome/browser/gpu_blacklist_unittest.cc

Issue 10831081: Add accelerated_video_decode as a GPU blacklist feature. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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: chrome/browser/gpu_blacklist_unittest.cc
===================================================================
--- chrome/browser/gpu_blacklist_unittest.cc (revision 149057)
+++ chrome/browser/gpu_blacklist_unittest.cc (working copy)
@@ -954,3 +954,32 @@
EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
}
+TEST_F(GpuBlacklistTest, VideoDecode) {
+ const std::string video_decode_json =
+ "{\n"
+ " \"name\": \"gpu blacklist\",\n"
+ " \"version\": \"0.1\",\n"
+ " \"entries\": [\n"
+ " {\n"
+ " \"id\": 1,\n"
+ " \"os\": {\n"
+ " \"type\": \"macosx\"\n"
+ " },\n"
+ " \"vendor_id\": \"0x10de\",\n"
+ " \"device_id\": [\"0x0640\"],\n"
+ " \"blacklist\": [\n"
+ " \"accelerated_video_decode\"\n"
+ " ]\n"
+ " }\n"
+ " ]\n"
+ "}";
+ Version os_version("10.6.4");
+
+ scoped_ptr<GpuBlacklist> blacklist(Create());
+ EXPECT_TRUE(blacklist->LoadGpuBlacklist(
+ video_decode_json, GpuBlacklist::kAllOs));
+ GpuFeatureType type = blacklist->DetermineGpuFeatureType(
+ GpuBlacklist::kOsMacosx, &os_version, gpu_info());
+ EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE);
+}
+

Powered by Google App Engine
This is Rietveld 408576698