OLD | NEW |
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 "base/logging.h" | 5 #include "base/logging.h" |
6 #include "content/test/gpu/gpu_test_expectations_parser.h" | 6 #include "content/test/gpu/gpu_test_expectations_parser.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 class GPUTestExpectationsParserTest : public testing::Test { | 9 class GPUTestExpectationsParserTest : public testing::Test { |
10 public: | 10 public: |
11 GPUTestExpectationsParserTest() { } | 11 GPUTestExpectationsParserTest() { } |
12 | 12 |
13 virtual ~GPUTestExpectationsParserTest() { } | 13 virtual ~GPUTestExpectationsParserTest() { } |
14 | 14 |
15 const GPUTestBotConfig& bot_config() const { | 15 const GPUTestBotConfig& bot_config() const { |
16 return bot_config_; | 16 return bot_config_; |
17 } | 17 } |
18 | 18 |
19 protected: | 19 protected: |
20 void SetUp() { | 20 virtual void SetUp() { |
21 bot_config_.set_os(GPUTestConfig::kOsWin7); | 21 bot_config_.set_os(GPUTestConfig::kOsWin7); |
22 bot_config_.set_build_type(GPUTestConfig::kBuildTypeRelease); | 22 bot_config_.set_build_type(GPUTestConfig::kBuildTypeRelease); |
23 bot_config_.AddGPUVendor(0x10de); | 23 bot_config_.AddGPUVendor(0x10de); |
24 bot_config_.set_gpu_device_id(0x0640); | 24 bot_config_.set_gpu_device_id(0x0640); |
25 ASSERT_TRUE(bot_config_.IsValid()); | 25 ASSERT_TRUE(bot_config_.IsValid()); |
26 } | 26 } |
27 | 27 |
28 void TearDown() { } | 28 virtual void TearDown() { } |
29 | 29 |
30 private: | 30 private: |
31 GPUTestBotConfig bot_config_; | 31 GPUTestBotConfig bot_config_; |
32 }; | 32 }; |
33 | 33 |
34 TEST_F(GPUTestExpectationsParserTest, CommentOnly) { | 34 TEST_F(GPUTestExpectationsParserTest, CommentOnly) { |
35 const std::string text = | 35 const std::string text = |
36 " \n" | 36 " \n" |
37 "// This is just some comment\n" | 37 "// This is just some comment\n" |
38 ""; | 38 ""; |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 TEST_F(GPUTestExpectationsParserTest, WebGLTestExpectationsValidation) { | 242 TEST_F(GPUTestExpectationsParserTest, WebGLTestExpectationsValidation) { |
243 GPUTestExpectationsParser parser; | 243 GPUTestExpectationsParser parser; |
244 EXPECT_TRUE(parser.LoadTestExpectations( | 244 EXPECT_TRUE(parser.LoadTestExpectations( |
245 GPUTestExpectationsParser::kWebGLConformanceTest)); | 245 GPUTestExpectationsParser::kWebGLConformanceTest)); |
246 EXPECT_EQ(0u, parser.GetErrorMessages().size()); | 246 EXPECT_EQ(0u, parser.GetErrorMessages().size()); |
247 for (size_t i = 0; i < parser.GetErrorMessages().size(); ++i) | 247 for (size_t i = 0; i < parser.GetErrorMessages().size(); ++i) |
248 LOG(ERROR) << parser.GetErrorMessages()[i]; | 248 LOG(ERROR) << parser.GetErrorMessages()[i]; |
249 } | 249 } |
250 | 250 |
OLD | NEW |