26 lines
686 B
HTML
26 lines
686 B
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<script>
|
|
const func = async function () {
|
|
var gotException = false;
|
|
try {
|
|
await navigator.gpu.requestAdapter();
|
|
} catch (ex) {
|
|
gotException = true;
|
|
}
|
|
ok(!gotException, "requesting an adapter should not throw");
|
|
};
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
func()
|
|
.catch(e => ok(false, "Unhandled exception " + e))
|
|
.finally(() => SimpleTest.finish());
|
|
</script>
|
|
</body>
|
|
</html>
|