| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // Make sure the directory exist. | 247 // Make sure the directory exist. |
| 248 base::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 = base::UTF16ToASCII(filename); |
| 258 #else | 258 #else |
| 259 std::string tmp(filename); | 259 std::string tmp(filename); |
| 260 #endif | 260 #endif |
| 261 for (size_t i = 0; i < tmp.size(); ++i) | 261 for (size_t i = 0; i < tmp.size(); ++i) |
| 262 tmp[i] = base::ToLowerASCII(tmp[i]); | 262 tmp[i] = base::ToLowerASCII(tmp[i]); |
| 263 | 263 |
| 264 return test_dir_.AppendASCII(tmp); | 264 return test_dir_.AppendASCII(tmp); |
| 265 } | 265 } |
| 266 | 266 |
| 267 // Compares or saves the bitmap currently loaded in the context, depending on | 267 // Compares or saves the bitmap currently loaded in the context, depending on |
| (...skipping 692 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 |