Revision 278bef4fc3194c6a6a5ba46f1215774f301f971f authored by Philip Jägenstedt on 22 March 2018, 14:57:46 UTC, committed by Philip Jägenstedt on 22 March 2018, 14:57:46 UTC
1 parent 99914e1
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([html, hr_time]) {
var idl_array = new IdlArray();
// HTML is needed for WindowOrWorkerGlobalScope. Provide dummy interfaces for
// things that HTML depends on in turn which are not under tests.
idl_array.add_untested_idls('interface Document {};');
idl_array.add_untested_idls('interface EventTarget {};');
idl_array.add_untested_idls('interface LinkStyle {};');
idl_array.add_untested_idls(html);
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/html.idl',
'/interfaces/hr-time.idl'].map(fetchText))
.then(doTest);
}, 'Test driver');
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...