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

Side by Side Diff: ui/gfx/codec/jpeg_codec_unittest.cc

Issue 1543183002: Switch to standard integer types in ui/gfx/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « ui/gfx/chromeos/codec/jpeg_codec_robust_slow_unittest.cc ('k') | ui/gfx/codec/png_codec.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <math.h> 5 #include <math.h>
6 #include <stddef.h>
7 #include <stdint.h>
6 8
7 #include "base/basictypes.h" 9 #include "base/macros.h"
8 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
9 #include "ui/gfx/codec/jpeg_codec.h" 11 #include "ui/gfx/codec/jpeg_codec.h"
10 12
11 namespace { 13 namespace {
12 14
13 // A JPEG image used by TopSitesMigrationTest, whose size is 1x1. 15 // A JPEG image used by TopSitesMigrationTest, whose size is 1x1.
14 // This image causes an invalid-read error to libjpeg-turbo 1.0.1. 16 // This image causes an invalid-read error to libjpeg-turbo 1.0.1.
15 const uint8 kTopSitesMigrationTestImage[] = 17 const uint8_t kTopSitesMigrationTestImage[] =
16 "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x00\x00\x01" 18 "\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x00\x00\x01"
17 "\x00\x01\x00\x00\xff\xdb\x00\x43\x00\x03\x02\x02\x03\x02\x02\x03" 19 "\x00\x01\x00\x00\xff\xdb\x00\x43\x00\x03\x02\x02\x03\x02\x02\x03"
18 "\x03\x03\x03\x04\x03\x03\x04\x05\x08\x05\x05\x04\x04\x05\x0a\x07" 20 "\x03\x03\x03\x04\x03\x03\x04\x05\x08\x05\x05\x04\x04\x05\x0a\x07"
19 "\x07\x06\x08\x0c\x0a\x0c\x0c\x0b\x0a\x0b\x0b\x0d\x0e\x12\x10\x0d" 21 "\x07\x06\x08\x0c\x0a\x0c\x0c\x0b\x0a\x0b\x0b\x0d\x0e\x12\x10\x0d"
20 "\x0e\x11\x0e\x0b\x0b\x10\x16\x10\x11\x13\x14\x15\x15\x15\x0c\x0f" 22 "\x0e\x11\x0e\x0b\x0b\x10\x16\x10\x11\x13\x14\x15\x15\x15\x0c\x0f"
21 "\x17\x18\x16\x14\x18\x12\x14\x15\x14\xff\xdb\x00\x43\x01\x03\x04" 23 "\x17\x18\x16\x14\x18\x12\x14\x15\x14\xff\xdb\x00\x43\x01\x03\x04"
22 "\x04\x05\x04\x05\x09\x05\x05\x09\x14\x0d\x0b\x0d\x14\x14\x14\x14" 24 "\x04\x05\x04\x05\x09\x05\x05\x09\x14\x0d\x0b\x0d\x14\x14\x14\x14"
23 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14" 25 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14"
24 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14" 26 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14"
25 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\xff\xc0" 27 "\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\xff\xc0"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 JPEGCodec::FORMAT_RGB, &output, 210 JPEGCodec::FORMAT_RGB, &output,
209 &outw, &outh); 211 &outw, &outh);
210 212
211 JPEGCodec::Decode(kTopSitesMigrationTestImage, 213 JPEGCodec::Decode(kTopSitesMigrationTestImage,
212 arraysize(kTopSitesMigrationTestImage), 214 arraysize(kTopSitesMigrationTestImage),
213 JPEGCodec::FORMAT_RGBA, &output, 215 JPEGCodec::FORMAT_RGBA, &output,
214 &outw, &outh); 216 &outw, &outh);
215 } 217 }
216 218
217 } // namespace gfx 219 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/chromeos/codec/jpeg_codec_robust_slow_unittest.cc ('k') | ui/gfx/codec/png_codec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698