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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if !defined(OS_WIN) | 7 #if !defined(OS_WIN) |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 AppendASCII(test_info.name()); | 238 AppendASCII(test_info.name()); |
239 | 239 |
240 // Hack for a quick lowercase. We assume all the tests names are ASCII. | 240 // Hack for a quick lowercase. We assume all the tests names are ASCII. |
241 base::FilePath::StringType tmp(test_dir_.value()); | 241 base::FilePath::StringType tmp(test_dir_.value()); |
242 for (size_t i = 0; i < tmp.size(); ++i) | 242 for (size_t i = 0; i < tmp.size(); ++i) |
243 tmp[i] = base::ToLowerASCII(tmp[i]); | 243 tmp[i] = base::ToLowerASCII(tmp[i]); |
244 test_dir_ = base::FilePath(tmp); | 244 test_dir_ = base::FilePath(tmp); |
245 | 245 |
246 if (action_ == GENERATE) { | 246 if (action_ == GENERATE) { |
247 // Make sure the directory exist. | 247 // Make sure the directory exist. |
248 file_util::CreateDirectory(test_dir_); | 248 base::CreateDirectory(test_dir_); |
249 } | 249 } |
250 } | 250 } |
251 | 251 |
252 // Returns the fully qualified path of a data file. | 252 // Returns the fully qualified path of a data file. |
253 base::FilePath test_file(const base::FilePath::StringType& filename) const { | 253 base::FilePath test_file(const base::FilePath::StringType& filename) const { |
254 // Hack for a quick lowercase. We assume all the test data file names are | 254 // Hack for a quick lowercase. We assume all the test data file names are |
255 // ASCII. | 255 // ASCII. |
256 #if defined(OS_WIN) | 256 #if defined(OS_WIN) |
257 std::string tmp = WideToASCII(filename); | 257 std::string tmp = WideToASCII(filename); |
258 #else | 258 #else |
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 pcanvas_->rotate(67); | 960 pcanvas_->rotate(67); |
961 vcanvas_->drawBitmap(bitmap, 20, -50, NULL); | 961 vcanvas_->drawBitmap(bitmap, 20, -50, NULL); |
962 pcanvas_->drawBitmap(bitmap, 20, -50, NULL); | 962 pcanvas_->drawBitmap(bitmap, 20, -50, NULL); |
963 EXPECT_EQ(0., ProcessImage(FILE_PATH_LITERAL("rotate"))); | 963 EXPECT_EQ(0., ProcessImage(FILE_PATH_LITERAL("rotate"))); |
964 } | 964 } |
965 } | 965 } |
966 | 966 |
967 #endif // !defined(USE_AURA) | 967 #endif // !defined(USE_AURA) |
968 | 968 |
969 } // namespace skia | 969 } // namespace skia |
OLD | NEW |