tor-browser

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

verify-get-undefined.tentative.https.sub.html (1694B)


      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="/shared-storage/resources/util.js"></script>
      6 <script src="/fenced-frame/resources/utils.js"></script>
      7 
      8 <body>
      9 <script>
     10 'use strict';
     11 
     12 for (const resolve_to_config of [true, false]) {
     13  promise_test(async () => {
     14    const ancestor_key = token();
     15    let url0 = generateURL("/shared-storage/resources/frame0.html",
     16                           [ancestor_key]);
     17    let url1 = generateURL("/shared-storage/resources/frame1.html",
     18                           [ancestor_key]);
     19 
     20    await addModuleOnce(
     21        "/shared-storage/resources/verify-get-undefined-module.js");
     22 
     23    let select_url_result = await sharedStorage.selectURL(
     24        "verify-get-undefined-url-selection-operation",
     25        [{url: url0,
     26          reportingMetadata: {'click':
     27                              "/shared-storage/resources/frame0.html"}},
     28         {url: url1,
     29          reportingMetadata:
     30            {'mouse interaction': "/shared-storage/resources/frame1.html",
     31            'click': "/shared-storage/resources/frame2.html"}}],
     32        {resolveToConfig: resolve_to_config,
     33         keepAlive: resolve_to_config});
     34 
     35    assert_true(validateSelectURLResult(select_url_result, resolve_to_config));
     36    attachFencedFrame(select_url_result, 'opaque-ads');
     37 
     38    // frame1_loaded implies that the operation was successful.
     39    assert_equals(await nextValueFromServer(ancestor_key), "frame1_loaded");
     40 
     41 }, 'verify-get-undefined-url-selection-operation selectURL() resolves to ' +
     42    (resolve_to_config ? 'config' : 'urn:uuid'));
     43 }
     44 
     45 </script>
     46 </body>