| <!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-allow-helper.html'; | |
| iframe.allow = "keyboard-map"; | |
| 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() allowed from within iframe'); | |
| </script> |