Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /client-hints/viewport-size/viewport-size-iframe.https.html - WPT Dashboard Interop Dashboard
<!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();
}));
});
});
</script>
<iframe src="../resources/viewport-frame.py" width=503 height=614></iframe>