| 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 26b1d6fbedb91f92d1ffc8b3b1c2b23e6902934b..820ce0d69c713f4a2bbc3e8859f7c2e807ea0209 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializerTest.cpp
|
| @@ -396,9 +396,12 @@ TEST(V8ScriptValueSerializerTest, RoundTripImageBitmap) {
|
|
|
| // Check that the pixel at (3, 3) is red.
|
| uint8_t pixel[4] = {};
|
| - ASSERT_TRUE(newImageBitmap->bitmapImage()->imageForCurrentFrame()->readPixels(
|
| - SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
|
| - &pixel, 4, 3, 3));
|
| + ASSERT_TRUE(
|
| + newImageBitmap->bitmapImage()
|
| + ->imageForCurrentFrame(ColorBehavior::transformToTargetForTesting())
|
| + ->readPixels(SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType,
|
| + kPremul_SkAlphaType),
|
| + &pixel, 4, 3, 3));
|
| ASSERT_THAT(pixel, ::testing::ElementsAre(255, 0, 0, 255));
|
| }
|
|
|
| @@ -432,9 +435,12 @@ TEST(V8ScriptValueSerializerTest, DecodeImageBitmap) {
|
|
|
| // Check that the pixels are opaque red and green, respectively.
|
| uint8_t pixels[8] = {};
|
| - ASSERT_TRUE(newImageBitmap->bitmapImage()->imageForCurrentFrame()->readPixels(
|
| - SkImageInfo::Make(2, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
|
| - &pixels, 8, 0, 0));
|
| + ASSERT_TRUE(
|
| + newImageBitmap->bitmapImage()
|
| + ->imageForCurrentFrame(ColorBehavior::transformToTargetForTesting())
|
| + ->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));
|
| }
|
|
|
| @@ -498,8 +504,8 @@ TEST(V8ScriptValueSerializerTest, TransferImageBitmap) {
|
|
|
| // Check that the pixel at (3, 3) is red.
|
| uint8_t pixel[4] = {};
|
| - sk_sp<SkImage> newImage =
|
| - newImageBitmap->bitmapImage()->imageForCurrentFrame();
|
| + sk_sp<SkImage> newImage = newImageBitmap->bitmapImage()->imageForCurrentFrame(
|
| + ColorBehavior::transformToTargetForTesting());
|
| ASSERT_TRUE(newImage->readPixels(
|
| SkImageInfo::Make(1, 1, kRGBA_8888_SkColorType, kPremul_SkAlphaType),
|
| &pixel, 4, 3, 3));
|
|
|