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

Side by Side 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: test improvements Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/HTMLImageElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« 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