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

Unified Diff: third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp

Issue 2869733004: Fix ImageResourceContent::Create()'s GetContentStatus() (Closed)
Patch Set: Rebase Created 3 years, 7 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/html/HTMLImageElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp b/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
index aa1a9c6b902d66a487178daa7b190e47836f6daf..977ae0096e3737ae141063d3ed15c8136ce4a947 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
@@ -106,8 +106,8 @@ TEST_F(ImageBitmapTest, ImageResourceConsistency) {
const ImageBitmapOptions default_options;
HTMLImageElement* image_element =
HTMLImageElement::Create(*Document::Create());
- ImageResourceContent* image =
- ImageResourceContent::Create(StaticBitmapImage::Create(image_).Get());
+ ImageResourceContent* image = ImageResourceContent::CreateLoaded(
+ StaticBitmapImage::Create(image_).Get());
image_element->SetImageResource(image);
Optional<IntRect> crop_rect =
@@ -149,7 +149,8 @@ TEST_F(ImageBitmapTest, ImageResourceConsistency) {
TEST_F(ImageBitmapTest, ImageBitmapSourceChanged) {
HTMLImageElement* image = HTMLImageElement::Create(*Document::Create());
ImageResourceContent* original_image_resource =
- ImageResourceContent::Create(StaticBitmapImage::Create(image_).Get());
+ ImageResourceContent::CreateLoaded(
+ StaticBitmapImage::Create(image_).Get());
image->SetImageResource(original_image_resource);
const ImageBitmapOptions default_options;
@@ -163,8 +164,8 @@ TEST_F(ImageBitmapTest, ImageBitmapSourceChanged) {
ASSERT_NE(image_bitmap->BitmapImage()->ImageForCurrentFrame(),
original_image_resource->GetImage()->ImageForCurrentFrame());
- ImageResourceContent* new_image_resource =
- ImageResourceContent::Create(StaticBitmapImage::Create(image2_).Get());
+ ImageResourceContent* new_image_resource = ImageResourceContent::CreateLoaded(
+ StaticBitmapImage::Create(image2_).Get());
image->SetImageResource(new_image_resource);
{
@@ -241,7 +242,8 @@ TEST_F(ImageBitmapTest, ImageBitmapColorSpaceConversionHTMLImageElement) {
image->width() * raster_image_info.bytesPerPixel(), 5, 5);
ImageResourceContent* original_image_resource =
- ImageResourceContent::Create(StaticBitmapImage::Create(image).Get());
+ ImageResourceContent::CreateLoaded(
+ StaticBitmapImage::Create(image).Get());
image_element->SetImageResource(original_image_resource);
Optional<IntRect> crop_rect = IntRect(0, 0, image->width(), image->height());
@@ -352,7 +354,8 @@ TEST_F(ImageBitmapTest, ImageBitmapColorSpaceConversionImageBitmap) {
image->width() * raster_image_info.bytesPerPixel(), 5, 5);
ImageResourceContent* source_image_resource =
- ImageResourceContent::Create(StaticBitmapImage::Create(image).Get());
+ ImageResourceContent::CreateLoaded(
+ StaticBitmapImage::Create(image).Get());
image_element->SetImageResource(source_image_resource);
Optional<IntRect> crop_rect = IntRect(0, 0, image->width(), image->height());
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698