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

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

Issue 2424733002: Add unittest to avoid duplicate id in gpu driver bug list (Closed)
Patch Set: add unittest for GpuBlacklist Created 4 years, 2 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
« no previous file with comments | « no previous file | gpu/config/gpu_control_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 } 82 }
83 83
84 TEST_F(GpuBlacklistTest, DuplicatedIDValidation) {
85 std::unique_ptr<GpuBlacklist> blacklist(GpuBlacklist::Create());
86 EXPECT_TRUE(blacklist->LoadList(
87 kSoftwareRenderingListJson, GpuBlacklist::kAllOs));
88 EXPECT_FALSE(blacklist->has_duplicated_entry_id());
89 }
90
84 #define GPU_BLACKLIST_FEATURE_TEST(test_name, feature_name, feature_type) \ 91 #define GPU_BLACKLIST_FEATURE_TEST(test_name, feature_name, feature_type) \
85 TEST_F(GpuBlacklistTest, test_name) { \ 92 TEST_F(GpuBlacklistTest, test_name) { \
86 RunFeatureTest(feature_name, feature_type); \ 93 RunFeatureTest(feature_name, feature_type); \
87 } 94 }
88 95
89 GPU_BLACKLIST_FEATURE_TEST(Accelerated2DCanvas, 96 GPU_BLACKLIST_FEATURE_TEST(Accelerated2DCanvas,
90 "accelerated_2d_canvas", 97 "accelerated_2d_canvas",
91 GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS) 98 GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)
92 99
93 GPU_BLACKLIST_FEATURE_TEST(GpuCompositing, 100 GPU_BLACKLIST_FEATURE_TEST(GpuCompositing,
(...skipping 30 matching lines...) Expand all
124 131
125 GPU_BLACKLIST_FEATURE_TEST(GpuRasterization, 132 GPU_BLACKLIST_FEATURE_TEST(GpuRasterization,
126 "gpu_rasterization", 133 "gpu_rasterization",
127 GPU_FEATURE_TYPE_GPU_RASTERIZATION) 134 GPU_FEATURE_TYPE_GPU_RASTERIZATION)
128 135
129 GPU_BLACKLIST_FEATURE_TEST(AcceleratedVpxDecode, 136 GPU_BLACKLIST_FEATURE_TEST(AcceleratedVpxDecode,
130 "accelerated_vpx_decode", 137 "accelerated_vpx_decode",
131 GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE) 138 GPU_FEATURE_TYPE_ACCELERATED_VPX_DECODE)
132 139
133 } // namespace gpu 140 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/config/gpu_control_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698