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

Unified Diff: Source/core/html/HTMLImageElementTest.cpp

Issue 1218413002: Remove width calculation in `Width` hint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed widthAttr support in `Width` hint Created 5 years, 5 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 | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLImageElementTest.cpp
diff --git a/Source/core/html/HTMLImageElementTest.cpp b/Source/core/html/HTMLImageElementTest.cpp
index 442f08c3fddd4ba2b411dc30993bd7a1a1fd1c68..d453af740f54db8bc9ec8d61fc1b94e3dbf747d4 100644
--- a/Source/core/html/HTMLImageElementTest.cpp
+++ b/Source/core/html/HTMLImageElementTest.cpp
@@ -28,7 +28,8 @@ TEST_F(HTMLImageElementTest, width)
{
RefPtrWillBeRawPtr<HTMLImageElement> image = HTMLImageElement::create(m_dummyPageHolder->document(), nullptr, /* createdByParser */ false);
image->setAttribute(HTMLNames::widthAttr, "400");
- EXPECT_EQ(400, image->resourceWidth().width);
+ // TODO(yoav): `width` does not impact resourceWidth until we resolve https://github.com/ResponsiveImagesCG/picture-element/issues/268
+ EXPECT_EQ(500, image->resourceWidth().width);
image->setAttribute(HTMLNames::sizesAttr, "100vw");
EXPECT_EQ(500, image->resourceWidth().width);
}
« no previous file with comments | « Source/core/html/HTMLImageElement.cpp ('k') | Source/core/html/parser/HTMLPreloadScanner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698