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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp

Issue 2727133002: Remove ColorBehavior argument to Image::imageForCurrentFrame (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
index 9eeb224318bbed02b47351befe0467da14281b64..3a65dea94ea9f6095bbe67b08f633547c20f7d52 100644
--- a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
@@ -384,12 +384,9 @@ TEST(V8ScriptValueSerializerTest, RoundTripImageBitmap) {
// Check that the pixel at (3, 3) is red.
uint8_t pixel[4] = {};
- ASSERT_TRUE(
- newImageBitmap->bitmapImage()
- ->imageForCurrentFrame(ColorBehavior::transformToTargetForTesting())
- ->readPixels(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType,
- kPremul_SkAlphaType),
- &pixel, 4, 3, 3));
+ ASSERT_TRUE(newImageBitmap->bitmapImage()->imageForCurrentFrame()->readPixels(
+ SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
+ &pixel, 4, 3, 3));
ASSERT_THAT(pixel, ::testing::ElementsAre(255, 0, 0, 255));
}
@@ -422,12 +419,9 @@ TEST(V8ScriptValueSerializerTest, DecodeImageBitmap) {
// Check that the pixels are opaque red and green, respectively.
uint8_t pixels[8] = {};
- ASSERT_TRUE(
- newImageBitmap->bitmapImage()
- ->imageForCurrentFrame(ColorBehavior::transformToTargetForTesting())
- ->readPixels(SkImageInfo::Make(2, 1, kRGBA_8888_SkColorType,
- kPremul_SkAlphaType),
- &pixels, 8, 0, 0));
+ ASSERT_TRUE(newImageBitmap->bitmapImage()->imageForCurrentFrame()->readPixels(
+ SkImageInfo::Make(2, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
+ &pixels, 8, 0, 0));
ASSERT_THAT(pixels, ::testing::ElementsAre(255, 0, 0, 255, 0, 255, 0, 255));
}
@@ -489,8 +483,8 @@ TEST(V8ScriptValueSerializerTest, TransferImageBitmap) {
// Check that the pixel at (3, 3) is red.
uint8_t pixel[4] = {};
- sk_sp<SkImage> newImage = newImageBitmap->bitmapImage()->imageForCurrentFrame(
- ColorBehavior::transformToTargetForTesting());
+ sk_sp<SkImage> newImage =
+ newImageBitmap->bitmapImage()->imageForCurrentFrame();
ASSERT_TRUE(newImage->readPixels(
SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
&pixel, 4, 3, 3));
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/ImageBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698