mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
2a53076d43
Differential Revision: https://phabricator.services.mozilla.com/D177938
30 lines
824 B
HTML
30 lines
824 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>
|
|
ok(
|
|
SpecialPowers.getBoolPref("dom.webgpu.enabled"),
|
|
"Pref should be enabled."
|
|
);
|
|
|
|
const func = async function () {
|
|
const adapter = await navigator.gpu.requestAdapter();
|
|
const limits = adapter.limits;
|
|
const features = adapter.features;
|
|
const device = await adapter.requestDevice();
|
|
ok(device !== undefined, "device !== undefined");
|
|
};
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
func()
|
|
.catch(e => ok(false, "Unhandled exception " + e))
|
|
.finally(() => SimpleTest.finish());
|
|
</script>
|
|
</body>
|
|
</html>
|