Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/images/image-change-without-resize-shouldnt-layout.html |
| diff --git a/third_party/WebKit/LayoutTests/fast/images/image-change-without-resize-shouldnt-layout.html b/third_party/WebKit/LayoutTests/fast/images/image-change-without-resize-shouldnt-layout.html |
| index 8327ff68a5b351be6fec798f97979c9370794445..b3aea6b1cc6d4d34069c201d19a2a4835c46d916 100644 |
| --- a/third_party/WebKit/LayoutTests/fast/images/image-change-without-resize-shouldnt-layout.html |
| +++ b/third_party/WebKit/LayoutTests/fast/images/image-change-without-resize-shouldnt-layout.html |
| @@ -6,11 +6,14 @@ |
| <img style="max-width: 100%" src="../replaced/resources/1x1-blue.png"> |
| </div> |
| <script> |
| -//TODO(siva.gunturi): Use async_test and use asserts on image.onload and window.onload. |
| -test(function() { |
| - document.documentElement.offsetTop; |
| - var img = document.querySelector("img"); |
| - img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAGUExURf8AAAAAAEGjEgMAAAAMSURBVHjaYmAACDAAAAIAAU9tWeEAAAAASUVORK5CYII="; |
| - assert_equals(internals.needsLayoutCount(), 0); |
| +async_test(function(t) { |
| + window.onload = t.step_func(function() { |
| + document.documentElement.offsetTop; |
| + var img = document.querySelector("img"); |
| + img.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAMAAAAoyzS7AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAAGUExURf8AAAAAAEGjEgMAAAAMSURBVHjaYmAACDAAAAIAAU9tWeEAAAAASUVORK5CYII="; |
| + img.onload = t.step_func_done(function() { |
|
fs
2016/08/17 08:56:08
Does it still work/pass if you assert needsLayoutC
sivag
2016/08/17 09:00:09
yes it works fine.
fs
2016/08/17 10:27:46
Could you add that assertion too then? =)
sivag
2016/08/17 10:41:09
Done.
|
| + assert_equals(internals.needsLayoutCount(), 0); |
| + }); |
| + }); |
| }); |
| </script> |