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

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

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/file_util.h" 6 #include "base/file_util.h"
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImageDecoder.h" 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebImageDecoder.h"
8 #include "webkit/tools/test_shell/image_decoder_unittest.h" 8 #include "webkit/tools/test_shell/image_decoder_unittest.h"
9 9
10 using WebKit::WebImageDecoder; 10 using WebKit::WebImageDecoder;
11 11
12 class ICOImageDecoderTest : public ImageDecoderTest { 12 class ICOImageDecoderTest : public ImageDecoderTest {
13 public: 13 public:
14 ICOImageDecoderTest() : ImageDecoderTest("ico") { } 14 ICOImageDecoderTest() : ImageDecoderTest("ico") { }
15 15
16 protected: 16 protected:
17 virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const { 17 virtual WebKit::WebImageDecoder* CreateWebKitImageDecoder() const {
18 return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeICO); 18 return new WebKit::WebImageDecoder(WebKit::WebImageDecoder::TypeICO);
19 } 19 }
20 }; 20 };
21 21
22 TEST_F(ICOImageDecoderTest, Decoding) { 22 TEST_F(ICOImageDecoderTest, Decoding) {
23 TestDecoding(); 23 TestDecoding();
24 } 24 }
25 25
26 TEST_F(ICOImageDecoderTest, ImageNonZeroFrameIndex) { 26 TEST_F(ICOImageDecoderTest, ImageNonZeroFrameIndex) {
27 // Test that the decoder decodes multiple sizes of icons which have them. 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. 28 // Load an icon that has both favicon-size and larger entries.
29 FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico")); 29 base::FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico"));
30 const FilePath md5_sum_path( 30 const base::FilePath md5_sum_path(
31 GetMD5SumPath(multisize_icon_path).value() + FILE_PATH_LITERAL("2")); 31 GetMD5SumPath(multisize_icon_path).value() + FILE_PATH_LITERAL("2"));
32 static const int kDesiredFrameIndex = 3; 32 static const int kDesiredFrameIndex = 3;
33 TestWebKitImageDecoder(multisize_icon_path, md5_sum_path, kDesiredFrameIndex); 33 TestWebKitImageDecoder(multisize_icon_path, md5_sum_path, kDesiredFrameIndex);
34 } 34 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate_win.cc ('k') | win8/delegate_execute/chrome_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698