tor-browser

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

load-ad-with-size.https.html (990B)


      1 <!DOCTYPE html>
      2 <title>Fenced frames loading a winning ad from FLEDGE auction with size</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="resources/utils.js"></script>
      6 <script src="/common/dispatcher/dispatcher.js"></script>
      7 <script src="/common/utils.js"></script>
      8 
      9 <body>
     10  <script>
     11    promise_test(async (t) => {
     12      var frame = await attachFencedFrameContext({
     13        generator_api: "fledge",
     14        resolve_to_config: true,
     15        ad_with_size: true
     16      });
     17 
     18      const assert_dimensions =
     19        (expected_width, expected_height) => {
     20          getComputedStyle(document.documentElement).width; // Force layout.
     21          assert_equals(window.innerWidth, expected_width, "width");
     22          assert_equals(window.innerHeight, expected_height, "height");
     23        }
     24      await frame.execute(assert_dimensions, [100, 50]);
     25    }, "Fenced frame loading an ad with size.");
     26  </script>
     27 </body>
     28 
     29 </html>