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

Side by Side Diff: third_party/WebKit/LayoutTests/svg/custom/object-sizing-zero-intrinsic-width-height.html

Issue 1681013004: Make object-sizing-zero-intrinsic-width-height a javascript test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/LayoutTests/svg/custom/object-sizing-zero-intrinsic-width-height-expected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>SVG in &lt;object> with zero intrinsic size</title>
3 <style> 3 <script src=../../resources/testharness.js></script>
4 object { 4 <script src=../../resources/testharnessreport.js></script>
5 background: red; 5 <object data-expected="0x0" data="data:image/svg+xml,
6 }
7 </style>
8 <body style="margin: 0px; padding: 0px;">
9 <!--There should not be any red rectangle visible. -->
10 <object data="data:image/svg+xml,
11 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0' height='0'> 6 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0' height='0'>
12 <rect width='50' height='50' fill='red'/> 7 <rect width='50' height='50' fill='red'/>
13 </svg> 8 </svg>"></object>
14 "></object> 9 <object data-expected="50x0" data="data:image/svg+xml,
15 <object data="data:image/svg+xml,
16 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='50' height='0'> 10 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='50' height='0'>
17 <rect width='50' height='50' fill='red'/> 11 <rect width='50' height='50' fill='red'/>
18 </svg> 12 </svg>"></object>
19 "></object> 13 <object data-expected="0x50" data="data:image/svg+xml,
20 <object data="data:image/svg+xml,
21 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0' height='50'> 14 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0' height='50'>
22 <rect width='50' height='50' fill='red'/> 15 <rect width='50' height='50' fill='red'/>
23 </svg> 16 </svg>"></object>
24 "></object> 17 <object data-expected="0x150" data="data:image/svg+xml,
25 <object data="data:image/svg+xml,
26 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0'> 18 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' width='0'>
27 <rect width='50' height='50' fill='red'/> 19 <rect width='50' height='50' fill='red'/>
28 </svg> 20 </svg>"></object>
29 "></object> 21 <object data-expected="300x0" data="data:image/svg+xml,
30 <object data="data:image/svg+xml,
31 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' height='0'> 22 <svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/ xlink' height='0'>
32 <rect width='50' height='50' fill='red'/> 23 <rect width='50' height='50' fill='red'/>
33 </svg> 24 </svg>"></object>
34 "></object> 25 <script>
35 </body> 26 Array.prototype.forEach.call(document.querySelectorAll('object'), function(eleme nt) {
36 </html> 27 var t = async_test(document.title + " - " + element.dataset.expected);
28 element.onload = function() {
29 requestAnimationFrame(t.step_func(function() {
30 var clientRect = element.getBoundingClientRect();
31 assert_equals(clientRect.width + "x" + clientRect.height, element.da taset.expected);
32 t.done();
33 }));
34 }
35 });
36 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/svg/custom/object-sizing-zero-intrinsic-width-height-expected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698