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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/sizes-changed-intrinsic-size-update.html

Issue 2292013002: Notify LayoutImage that intrinsic dimensions changed when sizes changes (Closed)
Patch Set: Created 4 years, 4 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/LayoutTests/fast/dom/HTMLImageElement/sizes-changed-intrinsic-size-update.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/sizes-changed-intrinsic-size-update.html b/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/sizes-changed-intrinsic-size-update.html
new file mode 100644
index 0000000000000000000000000000000000000000..dc7be6ccd82e91477c3dcc9daeaeb9956c42415d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/HTMLImageElement/sizes-changed-intrinsic-size-update.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<body>
+<img id="bla"
+ srcset="resources/black.png 100w,
+ resources/image-set-4x.png 1600w"
+ sizes="100px"
+>
+<script>
+ var t = async_test('Make sure that a sizes change also changes the intrinsic dimensions');
+ window.onload = t.step_func(function() {
+
+ var bla = document.getElementById("bla");
+ bla.onload = t.step_func(function() {
Stephen Chennney 2016/08/30 13:32:24 Should it be the case here that bla.width == 1600?
Yoav Weiss 2016/08/30 15:02:12 Good point. Added a test for that.
+ bla.onload = function(){};
+ bla.sizes = "100px";
+ assert_equals(bla.width, 100);
+ t.done();
+ });
+ bla.sizes = "1600px";
+ });
+</script>
+</body>
+</html>
« 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