tor-browser

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

config-installation-triggers-navigation.https.html (1207B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <script src="/common/utils.js"></script>
      5 <script src="/common/get-host-info.sub.js"></script>
      6 <script src="resources/utils.js"></script>
      7 <title>Test fenced frame config installation triggers navigation.</title>
      8 
      9 <body>
     10 
     11 <script>
     12 promise_test(async () => {
     13  const fenced_frame_loaded_key = token();
     14 
     15  const url = generateURL(
     16    'resources/fenced-frame-loaded.html', [fenced_frame_loaded_key]);
     17  const url_string = url.toString();
     18 
     19  // Create a fenced frame and install an inner config constructed with an url.
     20  const fenced_frame = document.createElement('fencedframe');
     21  const config = new FencedFrameConfig(url_string);
     22  fenced_frame.config = config;
     23  document.body.append(fenced_frame);
     24 
     25  // Installing an inner config to the fenced frame triggers navigation.
     26  const load_expected = "fenced frame loaded";
     27  const load_actual = await nextValueFromServer(fenced_frame_loaded_key);
     28  assert_equals(load_actual, load_expected,
     29                "Fenced frame successfully loaded.");
     30 
     31 }, 'Installing an inner config to a fenced frame triggers navigation.');
     32 </script>
     33 
     34 </body>