https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 683909fd3b1468f0c17a0c407e6f4e72a325d96b authored by Rebecca Hauck on 26 July 2014, 00:05:43 UTC
image file for tests
Tip revision: 683909f
idlharness.https.html
<!doctype html>
<html>
<head>
<title>Keyboard Map IDL tests</title>
<link rel="help" href="https://wicg.github.io/keyboard-map/"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script>
'use strict';

promise_test(async () =>  {
  var idl_array = new IdlArray();
  const keyboard_map_idl = await fetch("/interfaces/keyboard-map.idl")
      .then(r => r.text());
  const layout_map = await navigator.keyboard.getLayoutMap();

  idl_array.add_untested_idls('interface Navigator {};');
  idl_array.add_idls(keyboard_map_idl);

  window.layout_map = layout_map;

  idl_array.add_objects({
    Navigator: ['navigator'],
    Keyboard: ['navigator.keyboard'],
    KeyboardLayoutMap: ['layout_map'],
  });
  idl_array.test();
}, "Test IDL implementation of Keyboard Map API");
</script>
back to top