OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 "config.h" | |
6 | |
7 #include "webkit/tools/test_shell/image_decoder_unittest.h" | 5 #include "webkit/tools/test_shell/image_decoder_unittest.h" |
8 | 6 |
9 #include "base/file_path.h" | 7 #include "base/file_path.h" |
10 #include "base/file_util.h" | 8 #include "base/file_util.h" |
11 #include "base/md5.h" | 9 #include "base/md5.h" |
12 #include "base/path_service.h" | 10 #include "base/path_service.h" |
13 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
14 #include "base/string_util.h" | 12 #include "base/string_util.h" |
15 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" | 13 #include "third_party/WebKit/WebKit/chromium/public/WebData.h" |
16 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" | 14 #include "third_party/WebKit/WebKit/chromium/public/WebImage.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // Since WebImage does not expose get data by frame, get the size | 206 // Since WebImage does not expose get data by frame, get the size |
209 // through decoder and pass it to fromData so that the closest | 207 // through decoder and pass it to fromData so that the closest |
210 // image dats to the size is returned. | 208 // image dats to the size is returned. |
211 WebKit::WebSize size(decoder->getImage(desired_frame_index).size()); | 209 WebKit::WebSize size(decoder->getImage(desired_frame_index).size()); |
212 const WebKit::WebImage& image = WebKit::WebImage::fromData(data, size); | 210 const WebKit::WebImage& image = WebKit::WebImage::fromData(data, size); |
213 SaveMD5Sum(md5_sum_path.value(), image); | 211 SaveMD5Sum(md5_sum_path.value(), image); |
214 #else | 212 #else |
215 VerifyImage(*decoder, image_path, md5_sum_path, desired_frame_index); | 213 VerifyImage(*decoder, image_path, md5_sum_path, desired_frame_index); |
216 #endif | 214 #endif |
217 } | 215 } |
OLD | NEW |