tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

embed-svg-navigation-resets-size.html (1069B)


      1 <!doctype html>
      2 <meta charset=utf-8>
      3 <title>Intrinsic sizing of SVG embedded via &lt;embed&gt; should disappear on navigation</title>
      4 <script src=/resources/testharness.js></script>
      5 <script src=/resources/testharnessreport.js></script>
      6 <embed id="element" name="embed" src='data:image/svg+xml,
      7  <svg xmlns="http://www.w3.org/2000/svg"
      8       xmlns:xlink="http://www.w3.org/1999/xlink"
      9       viewBox="0 0 1000 1000"
     10       width="400"
     11       height="400"
     12       font-size="100">
     13  </svg>'></embed>
     14 <script>
     15 promise_test(async () => {
     16  await new Promise(resolve => {
     17    onload = resolve;
     18  });
     19 
     20  assert_equals(element.scrollWidth, 400, "The width should be determined by the embedded SVG");
     21  assert_equals(element.scrollHeight, 400, "The height should be determined by the embedded SVG");
     22 
     23  await new Promise(resolve => {
     24    element.onload = resolve;
     25    element.src = "about:blank";
     26  });
     27 
     28  assert_equals(element.scrollWidth, 300, "The width should be the default");
     29  assert_equals(element.scrollHeight, 150, "The height should be the default");
     30 });
     31 </script>