OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/testharness.js"></script> |
| 3 <script src="../../../resources/testharnessreport.js"></script> |
| 4 <body> |
| 5 <img id="image" |
| 6 srcset="resources/black.png 100w, |
| 7 resources/image-set-4x.png 1600w" |
| 8 sizes="100px" |
| 9 > |
| 10 <script> |
| 11 var t = async_test('Make sure that a sizes change also changes the intrinsic
dimensions'); |
| 12 window.onload = t.step_func(function() { |
| 13 |
| 14 var img = document.getElementById("image"); |
| 15 img.onload = t.step_func(function() { |
| 16 assert_equals(img.width, 1600); |
| 17 img.onload = function(){}; |
| 18 img.sizes = "100px"; |
| 19 assert_equals(img.width, 100); |
| 20 t.done(); |
| 21 }); |
| 22 img.sizes = "1600px"; |
| 23 }); |
| 24 </script> |
| 25 </body> |
| 26 </html> |
OLD | NEW |