Revision 65e0628ee53f311f25f50990f4e7b35ba67b06a0 authored by Henrik Skupin on 28 April 2018, 19:36:03 UTC, committed by moz-wptsync-bot on 28 April 2018, 19:48:02 UTC
bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1457089
gecko-commit: 9d124f189e612ef45f466456934ccc1b1a4ff824
gecko-integration-branch: central
gecko-reviewers: jgraham
1 parent 0027df2
Raw File
idlharness.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>High Resolution Time IDL tests</title>
<link rel="author" title="W3C" href="http://www.w3.org/" />
<link rel="help" href="http://www.w3.org/TR/hr-time/#sec-extenstions-performance-interface"/>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
</head>
<body>
<h1>High Resolution Time IDL tests</h1>
<div id="log"></div>
<script>
'use strict';

function doTest([dom, html, hr_time]) {
  var idl_array = new IdlArray();
  idl_array.add_untested_idls(dom, { only: ['EventTarget'] });
  idl_array.add_untested_idls(html, { only: ['WindowOrWorkerGlobalScope'] });
  idl_array.add_idls(hr_time);
  idl_array.add_objects({
    Performance: ["window.performance"],
    Window: ["window"],
  });
  idl_array.test();
}

function fetchText(url) {
  return fetch(url).then((response) => response.text());
}

promise_test(() => {
  return Promise.all(['/interfaces/dom.idl',
                      '/interfaces/html.idl',
                      '/interfaces/hr-time.idl'].map(fetchText))
                .then(doTest);
}, 'Test driver');
</script>
</body>
</html>
back to top