tor-browser

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

040.html (1444B)


      1 <!DOCTYPE html>
      2 <html><head>
      3        <title> scheduler: IFRAMEs added with DOM (innerHTML), javascript: URL</title>
      4        <script src="/resources/testharness.js"></script>
      5        <script src="/resources/testharnessreport.js"></script>
      6        <script src="testlib/testlib.js"></script>
      7 </head>
      8 <body>
      9 
     10        <div id="log">FAILED (This TC requires JavaScript enabled)</div>
     11        <div></div>
     12        <script>log('inline script #1');
     13                document.getElementsByTagName('div')[1].innerHTML = '<iframe src="javascript:parent.log(\'JS URL\');\'<html><script>parent.log(\\\'frame script\\\')<\/script></html>\'"></iframe>';
     14                log('end script #1');
     15        </script>
     16 
     17        <script type="text/javascript">
     18        log( 'inline script #2' );
     19        var t = async_test()
     20 
     21        function test() {
     22                assert_any(assert_array_equals, eventOrder, [
     23                  ['inline script #1', 'end script #1', 'JS URL', 'inline script #2', 'frame script'],
     24                  /* the following combination seems quite unlikely? */
     25                  ['inline script #1', 'end script #1', 'JS URL', 'frame script', 'inline script #2'],
     26                  ['inline script #1', 'end script #1', 'inline script #2', 'JS URL', 'frame script']]);
     27                t.done();
     28        }
     29        onload = t.step_func(function(){
     30                setTimeout(t.step_func(test), 200);
     31        });
     32        </script>
     33 
     34 </body></html>