tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

navigator-keyboard-map-blocked-from-iframe.https.html (740B)


      1 <!DOCTYPE html>
      2 <script src="/resources/testharness.js"></script>
      3 <script src="/resources/testharnessreport.js"></script>
      4 <body>
      5 <script>
      6 'use strict';
      7 
      8 promise_test(() => {
      9  let iframe = document.createElement('iframe');
     10  iframe.src = 'resources/iframe-keyboard-map-helper.html';
     11  iframe.allow = "keyboard-map 'none'";
     12  iframe.onload = () => {
     13    iframe.contentWindow.postMessage('Ready', '*');
     14  }
     15 
     16  document.body.appendChild(iframe);
     17 
     18  return new Promise((resolve,reject) => {
     19    window.onmessage = message => {
     20      if (message.data == 'Success') {
     21        resolve();
     22      } else if (message.data == 'Failure') {
     23        reject();
     24      }
     25    }
     26  });
     27 }, '[Keyboard Map] getLayoutMap() blocked from within iframe');
     28 
     29 </script>