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="bla" | |
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 bla = document.getElementById("bla"); | |
15 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.
| |
16 bla.onload = function(){}; | |
17 bla.sizes = "100px"; | |
18 assert_equals(bla.width, 100); | |
19 t.done(); | |
20 }); | |
21 bla.sizes = "1600px"; | |
22 }); | |
23 </script> | |
24 </body> | |
25 </html> | |
OLD | NEW |