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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 947
948 content::GPUInfo::GPUDevice gpu_device; 948 content::GPUInfo::GPUDevice gpu_device;
949 gpu_device.vendor_id = 0x8086; 949 gpu_device.vendor_id = 0x8086;
950 gpu_device.device_id = 0x0166; 950 gpu_device.device_id = 0x0166;
951 gpu_info.secondary_gpus.push_back(gpu_device); 951 gpu_info.secondary_gpus.push_back(gpu_device);
952 type = blacklist->DetermineGpuFeatureType( 952 type = blacklist->DetermineGpuFeatureType(
953 GpuBlacklist::kOsMacosx, &os_version, gpu_info); 953 GpuBlacklist::kOsMacosx, &os_version, gpu_info);
954 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); 954 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL);
955 } 955 }
956 956
957 TEST_F(GpuBlacklistTest, VideoDecode) {
958 const std::string video_decode_json =
959 "{\n"
960 " \"name\": \"gpu blacklist\",\n"
961 " \"version\": \"0.1\",\n"
962 " \"entries\": [\n"
963 " {\n"
964 " \"id\": 1,\n"
965 " \"os\": {\n"
966 " \"type\": \"macosx\"\n"
967 " },\n"
968 " \"vendor_id\": \"0x10de\",\n"
969 " \"device_id\": [\"0x0640\"],\n"
970 " \"blacklist\": [\n"
971 " \"accelerated_video_decode\"\n"
972 " ]\n"
973 " }\n"
974 " ]\n"
975 "}";
976 Version os_version("10.6.4");
977
978 scoped_ptr<GpuBlacklist> blacklist(Create());
979 EXPECT_TRUE(blacklist->LoadGpuBlacklist(
980 video_decode_json, GpuBlacklist::kAllOs));
981 GpuFeatureType type = blacklist->DetermineGpuFeatureType(
982 GpuBlacklist::kOsMacosx, &os_version, gpu_info());
983 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE);
984 }
985
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698