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

Side by Side Diff: tests/CodexTest.cpp

Issue 1054673002: Ico test with embedded png (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Merge with latest Created 5 years, 8 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 | « resources/google_chrome.ico ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "Resources.h" 8 #include "Resources.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCodec.h" 10 #include "SkCodec.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 DEF_TEST(Codec, r) { 83 DEF_TEST(Codec, r) {
84 // WBMP 84 // WBMP
85 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false); 85 check(r, "mandrill.wbmp", SkISize::Make(512, 512), false);
86 86
87 // BMP 87 // BMP
88 check(r, "randPixels.bmp", SkISize::Make(8, 8), false); 88 check(r, "randPixels.bmp", SkISize::Make(8, 8), false);
89 89
90 // ICO 90 // ICO
91 // These two tests examine interestingly different behavior:
92 // Decodes an embedded BMP image
91 check(r, "color_wheel.ico", SkISize::Make(128, 128), false); 93 check(r, "color_wheel.ico", SkISize::Make(128, 128), false);
94 // Decodes an embedded PNG image
95 check(r, "google_chrome.ico", SkISize::Make(256, 256), false);
92 96
93 // PNG 97 // PNG
94 check(r, "arrow.png", SkISize::Make(187, 312), true); 98 check(r, "arrow.png", SkISize::Make(187, 312), true);
95 check(r, "baby_tux.png", SkISize::Make(240, 246), true); 99 check(r, "baby_tux.png", SkISize::Make(240, 246), true);
96 check(r, "color_wheel.png", SkISize::Make(128, 128), true); 100 check(r, "color_wheel.png", SkISize::Make(128, 128), true);
97 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true); 101 check(r, "half-transparent-white-pixel.png", SkISize::Make(1, 1), true);
98 check(r, "mandrill_128.png", SkISize::Make(128, 128), true); 102 check(r, "mandrill_128.png", SkISize::Make(128, 128), true);
99 check(r, "mandrill_16.png", SkISize::Make(16, 16), true); 103 check(r, "mandrill_16.png", SkISize::Make(16, 16), true);
100 check(r, "mandrill_256.png", SkISize::Make(256, 256), true); 104 check(r, "mandrill_256.png", SkISize::Make(256, 256), true);
101 check(r, "mandrill_32.png", SkISize::Make(32, 32), true); 105 check(r, "mandrill_32.png", SkISize::Make(32, 32), true);
102 check(r, "mandrill_512.png", SkISize::Make(512, 512), true); 106 check(r, "mandrill_512.png", SkISize::Make(512, 512), true);
103 check(r, "mandrill_64.png", SkISize::Make(64, 64), true); 107 check(r, "mandrill_64.png", SkISize::Make(64, 64), true);
104 check(r, "plane.png", SkISize::Make(250, 126), true); 108 check(r, "plane.png", SkISize::Make(250, 126), true);
105 check(r, "randPixels.png", SkISize::Make(8, 8), true); 109 check(r, "randPixels.png", SkISize::Make(8, 8), true);
106 check(r, "yellow_rose.png", SkISize::Make(400, 301), true); 110 check(r, "yellow_rose.png", SkISize::Make(400, 301), true);
107 } 111 }
OLDNEW
« no previous file with comments | « resources/google_chrome.ico ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698