Chromium Code Reviews| 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> |