summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/client-hints/viewport-size/viewport-size-window.https.html
blob: 0de61362b30a08cb31a617ab84a93f6d0dd4bbf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
promise_test(t => {
  return new Promise(resolve => {
    window.addEventListener("message", t.step_func(e => {
      assert_equals(e.data.viewportWidth, window.innerWidth.toString());
      assert_equals(e.data.viewportHeight, window.innerHeight.toString());
      resolve();
    }));
  });
});
window.open("../resources/viewport-frame.py", "");
</script>