1
0
Fork 0
firefox/testing/web-platform/tests/keyboard-map/navigator-keyboard-map-blocked-from-iframe.https.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

29 lines
740 B
HTML

<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
'use strict';
promise_test(() => {
let iframe = document.createElement('iframe');
iframe.src = 'resources/iframe-keyboard-map-helper.html';
iframe.allow = "keyboard-map 'none'";
iframe.onload = () => {
iframe.contentWindow.postMessage('Ready', '*');
}
document.body.appendChild(iframe);
return new Promise((resolve,reject) => {
window.onmessage = message => {
if (message.data == 'Success') {
resolve();
} else if (message.data == 'Failure') {
reject();
}
}
});
}, '[Keyboard Map] getLayoutMap() blocked from within iframe');
</script>