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

Side by Side Diff: gpu/config/gpu_blacklist_unittest.cc

Issue 2460943002: Lower ES3 capable requirement to GL 3.3 with extensions. (Closed)
Patch Set: fix win build Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "gpu/config/gpu_blacklist.h" 5 #include "gpu/config/gpu_blacklist.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "gpu/config/gpu_control_list_jsons.h" 9 #include "gpu/config/gpu_control_list_jsons.h"
10 #include "gpu/config/gpu_feature_type.h" 10 #include "gpu/config/gpu_feature_type.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void TearDown() override {} 72 void TearDown() override {}
73 73
74 private: 74 private:
75 GPUInfo gpu_info_; 75 GPUInfo gpu_info_;
76 }; 76 };
77 77
78 TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) { 78 TEST_F(GpuBlacklistTest, CurrentBlacklistValidation) {
79 std::unique_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create()); 79 std::unique_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create());
80 EXPECT_TRUE(blacklist->LoadList( 80 EXPECT_TRUE(blacklist->LoadList(
81 kSoftwareRenderingListJson, GpuBlacklist::kAllOs)); 81 kSoftwareRenderingListJson, GpuBlacklist::kAllOs));
82
83 // Check with a fake GPU with GL version 3.3, WebGL2 is blacklisted on Mac.
84 GPUInfo gpu_info;
85 gpu_info.gpu.vendor_id = 0x1234;
86 gpu_info.gpu.device_id = 0x5678;
87 gpu_info.gl_version = "3.3";
88 std::set<int> type = blacklist->MakeDecision(
89 GpuBlacklist::kOsMacosx, kOsVersion, gpu_info);
90 EXPECT_EQ(1u, type.count(GPU_FEATURE_TYPE_WEBGL2));
82 } 91 }
83 92
84 TEST_F(GpuBlacklistTest, DuplicatedIDValidation) { 93 TEST_F(GpuBlacklistTest, DuplicatedIDValidation) {
85 std::unique_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create()); 94 std::unique_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create());
86 EXPECT_TRUE(blacklist->LoadList( 95 EXPECT_TRUE(blacklist->LoadList(
87 kSoftwareRenderingListJson, GpuBlacklist::kAllOs)); 96 kSoftwareRenderingListJson, GpuBlacklist::kAllOs));
88 EXPECT_FALSE(blacklist->has_duplicated_entry_id()); 97 EXPECT_FALSE(blacklist->has_duplicated_entry_id());
89 } 98 }
90 99
91 #define GPU_BLACKLIST_FEATURE_TEST(test_name, feature_name, feature_type) \ 100 #define GPU_BLACKLIST_FEATURE_TEST(test_name, feature_name, feature_type) \
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 GPU_FEATURE_TYPE_PANEL_FITTING) 139 GPU_FEATURE_TYPE_PANEL_FITTING)
131 140
132 GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, 141 GPU_BLACKLIST_FEATURE_TEST(GpuRasterization,
133 "gpu_rasterization", 142 "gpu_rasterization",
134 GPU_FEATURE_TYPE_GPU_RASTERIZATION) 143 GPU_FEATURE_TYPE_GPU_RASTERIZATION)
135 144
136 GPU_BLACKLIST_FEATURE_TEST(AcceleratedVpxDecode, 145 GPU_BLACKLIST_FEATURE_TEST(AcceleratedVpxDecode,
137 "accelerated_vpx_decode", 146 "accelerated_vpx_decode",
138 GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) 147 GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE)
139 148
149 GPU_BLACKLIST_FEATURE_TEST(WebGL2,
150 "webgl2",
151 GPU_FEATURE_TYPE_WEBGL2)
152
140 } // namespace gpu 153 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698