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

Side by Side Diff: webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp

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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/files/file_path.h"
6 #include "base/file_util.h"
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImageDecoder.h"
8 #include "webkit/tools/test_shell/image_decoder_unittest.h"
9
10 using WebKit::WebImageDecoder;
11
12 class ICOImageDecoderTest : public ImageDecoderTest {
13 public:
14 ICOImageDecoderTest() : ImageDecoderTest("ico") { }
15
16 protected:
17 virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const OVERRIDE {
18 return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeICO);
19 }
20 };
21
22 TEST_F(ICOImageDecoderTest, Decoding) {
23 TestDecoding();
24 }
25
26 TEST_F(ICOImageDecoderTest, ImageNonZeroFrameIndex) {
27 // Test that the decoder decodes multiple sizes of icons which have them.
28 // Load an icon that has both favicon-size and larger entries.
29 base::FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico"));
30 const base::FilePath md5_sum_path(
31 GetMD5SumPath(multisize_icon_path).value() + FILE_PATH_LITERAL("2"));
32 static const int kDesiredFrameIndex = 3;
33 TestWebKitImageDecoder(multisize_icon_path, md5_sum_path, kDesiredFrameIndex);
34 }
OLDNEW
« no previous file with comments | « webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp ('k') | webkit/tools/webcore_unit_tests/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698