2 <script src=
"../../resources/testharness.js"></script>
3 <script src=
"../../resources/testharnessreport.js"></script>
5 .specwidth { width:
400px }
7 .test { display: block; background-color: red }
8 .sizer { width:
200px }
9 .control { /* overlay to hide the red */
13 background-color: green;
17 <div class=
"specwidth">
19 <svg class=
"test" viewBox=
"0 0 1 1">
29 var bounds
= document
.querySelector('.test').getBoundingClientRect();
30 assert_equals(bounds
.width
, 200);
31 assert_equals(bounds
.height
, 200);
32 }, "Use available width and use intrinsic ratio to compute height");