wpt / svg / struct / scripted / svg-checkIntersection-001.svg

Status: PASS | Duration: 46ms | Subtests: 1/1 | Open test on wpt.live | wpt.fyi

/svg/struct/scripted/svg-checkIntersection-001.svg

<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:h="http://www.w3.org/1999/xhtml">
  <h:script src="/resources/testharness.js"/>
  <h:script src="/resources/testharnessreport.js"/>
  <script>
    const test = async_test('checkIntersection() / checkEnclosure() with null ref. element');
    window.onload = test.step_func_done(() => {
      const root = document.documentElement;
      assert_throws_js(TypeError, () => root.checkIntersection(null, root.createSVGRect()));
      assert_throws_js(TypeError, () => root.checkEnclosure(null, root.createSVGRect()));
    });
  </script>
  <!-- This test passes if it does not crash. -->
  <text>PASS</text>
</svg>