summaryrefslogtreecommitdiffstats
path: root/skia
diff options
context:
space:
mode:
authoryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 22:11:41 +0000
committeryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-08 22:11:41 +0000
commit76d316196deedfa00a81d089c3116cf47110395f (patch)
tree1e88dae921a10bcfe4be63e2470e46ab4d20e32f /skia
parent7a766a21fc455ee5350117895f320f54470d4653 (diff)
downloadchromium_src-76d316196deedfa00a81d089c3116cf47110395f.zip
chromium_src-76d316196deedfa00a81d089c3116cf47110395f.tar.gz
chromium_src-76d316196deedfa00a81d089c3116cf47110395f.tar.bz2
UpStreamimg *image_decoder_unittest. Used WebKit API's ImageDecoder to
decouple WebCore deps. Corresponding WebKit Bug 35415. BUG=28063 TEST=Run unit tests. Review URL: http://codereview.chromium.org/661231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'skia')
-rw-r--r--skia/ext/vector_canvas_unittest.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/skia/ext/vector_canvas_unittest.cc b/skia/ext/vector_canvas_unittest.cc
index 11c6f41..328de22 100644
--- a/skia/ext/vector_canvas_unittest.cc
+++ b/skia/ext/vector_canvas_unittest.cc
@@ -5,14 +5,14 @@
#include "config.h"
#include "build/build_config.h"
-#include "webkit/tools/test_shell/image_decoder_unittest.h"
-
#if !defined(OS_WIN)
#include <unistd.h>
#endif
#include "PNGImageDecoder.h"
+#undef LOG
+
#include "app/gfx/codec/png_codec.h"
#include "base/command_line.h"
#include "base/file_util.h"
@@ -28,6 +28,13 @@ namespace {
const wchar_t* const kGenerateSwitch = L"vector-canvas-generate";
+void ReadFileToVector(const FilePath& path, Vector<char>* contents) {
+ std::string contents_str;
+ file_util::ReadFileToString(path, &contents_str);
+ contents->resize(contents_str.size());
+ memcpy(&contents->first(), contents_str.data(), contents_str.size());
+}
+
// Lightweight HDC management.
class Context {
public: