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

Unified Diff: content/renderer/ico_image_decoder_unittest.cc

Issue 12725006: Move image decoder unit tests to content_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits addressed Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/bmp_image_decoder_unittest.cc ('k') | content/test/image_decoder_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/ico_image_decoder_unittest.cc
diff --git a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp b/content/renderer/ico_image_decoder_unittest.cc
similarity index 87%
rename from webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
rename to content/renderer/ico_image_decoder_unittest.cc
index dd6470294755d7067e0891e76a3d188b85820b88..3b02874772a7a0c4f8992f19ec4a6a38a221a5bc 100644
--- a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
+++ b/content/renderer/ico_image_decoder_unittest.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/files/file_path.h"
#include "base/file_util.h"
+#include "base/files/file_path.h"
+#include "content/test/image_decoder_test.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebImageDecoder.h"
-#include "webkit/tools/test_shell/image_decoder_unittest.h"
using WebKit::WebImageDecoder;
@@ -14,7 +14,7 @@ class ICOImageDecoderTest : public ImageDecoderTest {
ICOImageDecoderTest() : ImageDecoderTest("ico") { }
protected:
- virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE {
+ virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE {
return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeICO);
}
};
@@ -24,6 +24,8 @@ TEST_F(ICOImageDecoderTest, Decoding) {
}
TEST_F(ICOImageDecoderTest, ImageNonZeroFrameIndex) {
+ if (data_dir_.empty())
+ return;
// Test that the decoder decodes multiple sizes of icons which have them.
// Load an icon that has both favicon-size and larger entries.
base::FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico"));
« no previous file with comments | « content/renderer/bmp_image_decoder_unittest.cc ('k') | content/test/image_decoder_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698