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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/svg-image-intrinsic-size-with-cssstyle-auto-dynamic-image-change.html

Issue 2230963002: SVG Image intrinsic size should be used if css style size is 'auto' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rename file Created 4 years, 4 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Test <svg:image>'s sizing with css size as auto, with dynamic image chang e</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <svg height="0">
6 <image width="200" height="200" xlink:href="resources/square-green-checker.png " style="width:auto; height:auto"/>
7 </svg>
8 <script>
9 window.onload = function () {
10 async_test(function(t) {
fs 2016/08/19 08:59:45 Switch the order of these two lines, and use a ste
Shanmuga Pandi 2016/09/14 09:20:16 Done.
11 var image = document.getElementsByTagName('image')[0];
fs 2016/08/19 08:59:45 querySelector('image')
Shanmuga Pandi 2016/09/14 09:20:16 Done.
12 var rectBBox = image.getBBox();
13 assert_equals(rectBBox.width, 400);
14 assert_equals(rectBBox.height, 400);
15 image.setAttributeNS("http://www.w3.org/1999/xlink","href","data:image/s vg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'></svg>") ;
16 image.onload = t.step_func_done(function() {
17 var rectBBox = image.getBBox();
18 assert_equals(rectBBox.width, 100);
19 assert_equals(rectBBox.height, 100);
20 });
21 }, document.title + ' and box size should be ' + '100 100');
fs 2016/08/19 08:59:45 I think you can go with the default testname here.
Shanmuga Pandi 2016/09/14 09:20:16 Done.
22 };
23 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698