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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/BitmapImageTest.cpp

Issue 2559013002: Add ColorBehavior to blink::Image draw methods (Closed)
Patch Set: Rebase Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 loadImage("/LayoutTests/images/resources/green.jpg"); 244 loadImage("/LayoutTests/images/resources/green.jpg");
245 setFirstFrameNotComplete(); 245 setFirstFrameNotComplete();
246 EXPECT_GT(lastDecodedSizeChange(), 0); 246 EXPECT_GT(lastDecodedSizeChange(), 0);
247 m_imageObserver->m_lastDecodedSizeChangedDelta = 0; 247 m_imageObserver->m_lastDecodedSizeChangedDelta = 0;
248 248
249 // Calling dataChanged causes the cache to flush, but doesn't affect the 249 // Calling dataChanged causes the cache to flush, but doesn't affect the
250 // source's decoded frames. It shouldn't affect decoded size. 250 // source's decoded frames. It shouldn't affect decoded size.
251 m_image->dataChanged(true); 251 m_image->dataChanged(true);
252 EXPECT_EQ(0, lastDecodedSizeChange()); 252 EXPECT_EQ(0, lastDecodedSizeChange());
253 // Recaching the first frame also shouldn't affect decoded size. 253 // Recaching the first frame also shouldn't affect decoded size.
254 m_image->imageForCurrentFrame(); 254 m_image->imageForCurrentFrame(ColorBehavior::transformToTargetForTesting());
255 EXPECT_EQ(0, lastDecodedSizeChange()); 255 EXPECT_EQ(0, lastDecodedSizeChange());
256 } 256 }
257 257
258 template <typename HistogramEnumType> 258 template <typename HistogramEnumType>
259 struct HistogramTestParams { 259 struct HistogramTestParams {
260 const char* filename; 260 const char* filename;
261 HistogramEnumType type; 261 HistogramEnumType type;
262 }; 262 };
263 263
264 template <typename HistogramEnumType> 264 template <typename HistogramEnumType>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 OriginRightBottom}, 326 OriginRightBottom},
327 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg", 327 {"/LayoutTests/images/resources/exif-orientation-8-llo.jpg",
328 OriginLeftBottom}}; 328 OriginLeftBottom}};
329 329
330 INSTANTIATE_TEST_CASE_P( 330 INSTANTIATE_TEST_CASE_P(
331 DecodedImageOrientationHistogramTest, 331 DecodedImageOrientationHistogramTest,
332 DecodedImageOrientationHistogramTest, 332 DecodedImageOrientationHistogramTest,
333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams)); 333 ::testing::ValuesIn(kDecodedImageOrientationHistogramTestParams));
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698