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

Side by Side Diff: content/test/gpu/gpu_test_config_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
« no previous file with comments | « content/shell/shell_devtools_delegate.cc ('k') | content/test/layout_browsertest.cc » ('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) 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 "content/test/gpu/gpu_test_config.h" 5 #include "content/test/gpu/gpu_test_config.h"
6 #include "content/public/common/gpu_info.h" 6 #include "content/public/common/gpu_info.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 class GPUTestConfigTest : public testing::Test { 9 class GPUTestConfigTest : public testing::Test {
10 public: 10 public:
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 141 }
142 142
143 TEST_F(GPUTestConfigTest, StringMatches) { 143 TEST_F(GPUTestConfigTest, StringMatches) {
144 GPUTestBotConfig config; 144 GPUTestBotConfig config;
145 config.set_os(GPUTestConfig::kOsWin7); 145 config.set_os(GPUTestConfig::kOsWin7);
146 config.set_build_type(GPUTestConfig::kBuildTypeRelease); 146 config.set_build_type(GPUTestConfig::kBuildTypeRelease);
147 config.AddGPUVendor(0x10de); 147 config.AddGPUVendor(0x10de);
148 config.set_gpu_device_id(0x0640); 148 config.set_gpu_device_id(0x0640);
149 EXPECT_TRUE(config.IsValid()); 149 EXPECT_TRUE(config.IsValid());
150 150
151 EXPECT_TRUE(config.Matches("")); 151 EXPECT_TRUE(config.Matches(std::string()));
152 152
153 // os matching 153 // os matching
154 EXPECT_TRUE(config.Matches("WIN")); 154 EXPECT_TRUE(config.Matches("WIN"));
155 EXPECT_TRUE(config.Matches("WIN7")); 155 EXPECT_TRUE(config.Matches("WIN7"));
156 EXPECT_FALSE(config.Matches("MAC")); 156 EXPECT_FALSE(config.Matches("MAC"));
157 EXPECT_TRUE(config.Matches("WIN7 LINUX")); 157 EXPECT_TRUE(config.Matches("WIN7 LINUX"));
158 158
159 // gpu vendor matching 159 // gpu vendor matching
160 EXPECT_TRUE(config.Matches("NVIDIA")); 160 EXPECT_TRUE(config.Matches("NVIDIA"));
161 EXPECT_TRUE(config.Matches("NVIDIA AMD")); 161 EXPECT_TRUE(config.Matches("NVIDIA AMD"));
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 TEST_F(GPUTestConfigTest, LoadCurrentConfig) { 243 TEST_F(GPUTestConfigTest, LoadCurrentConfig) {
244 GPUTestBotConfig config; 244 GPUTestBotConfig config;
245 content::GPUInfo gpu_info; 245 content::GPUInfo gpu_info;
246 gpu_info.gpu.vendor_id = 0x10de; 246 gpu_info.gpu.vendor_id = 0x10de;
247 gpu_info.gpu.device_id = 0x0640; 247 gpu_info.gpu.device_id = 0x0640;
248 EXPECT_TRUE(config.LoadCurrentConfig(&gpu_info)); 248 EXPECT_TRUE(config.LoadCurrentConfig(&gpu_info));
249 EXPECT_TRUE(config.IsValid()); 249 EXPECT_TRUE(config.IsValid());
250 } 250 }
251 251
OLDNEW
« no previous file with comments | « content/shell/shell_devtools_delegate.cc ('k') | content/test/layout_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698