tor-browser

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

svgboolean-animation-invalid-value-1.html (1289B)


      1 <!doctype html>
      2 <title>Test SVGBoolean animation with invalid value: String values in from and to attributes.</title>
      3 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#FromAttribute">
      4 <link rel="help" href="https://www.w3.org/TR/2001/REC-smil-animation-20010904/#ToAttribute">
      5 <script src="/resources/testharness.js"></script>
      6 <script src="/resources/testharnessreport.js"></script>
      7 
      8 <svg id="svg">
      9    <defs>
     10        <filter id="filter">
     11            <feConvolveMatrix id="effect" kernelMatrix="0 0 0   0 1 0   0 0 0" preserveAlpha="false">
     12                <animate attributeName="preserveAlpha" begin="0s" dur="4s" from="fa   lse" to="t   rue" />
     13            </feConvolveMatrix>
     14        </filter>
     15    </defs>
     16    <rect width="100" height="100" fill="green" filter="url(#filter)"></rect>
     17 </svg>
     18 
     19 <script>
     20 
     21 async_test(t => {
     22    const svg = document.getElementById("svg");
     23    const effect = document.getElementById("effect");
     24 
     25    window.addEventListener('load', t.step_func(() => {
     26        svg.setCurrentTime(2);
     27 
     28        requestAnimationFrame(t.step_func_done(() => {
     29            assert_equals(effect.preserveAlpha.baseVal, false);
     30            assert_equals(effect.preserveAlpha.animVal, effect.preserveAlpha.baseVal);
     31        }));
     32    }));
     33  });
     34 
     35 </script>