summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html')
-rw-r--r--testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html b/testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html
new file mode 100644
index 0000000000..88b2fbff5d
--- /dev/null
+++ b/testing/web-platform/tests/keyboard-map/resources/iframe-keyboard-map-allow-helper.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<script>
+'use strict';
+
+window.onmessage = message => {
+ if (message.data === 'Ready') {
+ let onSuccess = () => { parent.postMessage('Success', '*'); };
+ let onError = error => {
+ parent.postMessage('Failure', '*');
+ };
+
+ navigator.keyboard.getLayoutMap().then(onSuccess, onError).catch(onError);
+ }
+};
+
+</script>