tor-browser

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

srcdoc-anchor.html (724B)


      1 <title>Verify srcdoc content loads when src is about:srcdoc#foo.</title>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 
      5 <iframe id=myframe srcdoc='srcdoc_text' src='about:srcdoc#foo'></iframe>
      6 
      7 <script>
      8  async_test(function(t) {
      9    // Verify that the srcdoc content is loaded before we start.
     10    window.onload = t.step_func_done(() => {
     11        assert_true(typeof myframe.contentDocument !== 'undefined',
     12            'iframe has contentDocument');
     13        assert_equals(myframe.contentDocument.body.innerText, 'srcdoc_text',
     14            'iframe contains srcdoc content');
     15    }, '');
     16  }, 'Verify srcdoc content loads when src is about:srcdoc#foo.');
     17 </script>