summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resize-lock-zoom.https.html
blob: 783f51d84eb6803bca38544e3ad6d665cbaa7461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
  <title>Test FencedFrames does not leak the CSS zoom property</title>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="resources/utils.js"></script>
  <script src="/common/utils.js"></script>

  <body>

    <script>
      promise_test(async () => {
        const resize_lock_inner_page_is_ready_key = token();
        const resize_lock_resize_is_done_key = token();
        const resize_lock_report_inner_dimensions_key = token();

        const frame = attachFencedFrame(generateURL(
            "resources/resize-lock-inner.html",
            [resize_lock_inner_page_is_ready_key,
             resize_lock_resize_is_done_key,
             resize_lock_report_inner_dimensions_key]));

        await nextValueFromServer(resize_lock_inner_page_is_ready_key);

        document.body.style.zoom = '2';

        writeValueToServer(resize_lock_resize_is_done_key,
                           "outer_page_attempted_resize");

        let result =
          await nextValueFromServer(resize_lock_report_inner_dimensions_key);
        assert_equals(result, "300x150",
                      "fenced frame dimensions should not be updated by " +
                      "parent page");

      }, "Test Resize Lock");
    </script>

  </body>
</html>