summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js')
-rw-r--r--testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js b/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js
index 9391be8dbf..5a09b05c7d 100644
--- a/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js
+++ b/testing/web-platform/tests/webnn/conformance_tests/buffer.https.any.js
@@ -1,5 +1,7 @@
// META: title=test WebNN API buffer operations
// META: global=window,dedicatedworker
+// META: variant=?cpu
+// META: variant=?gpu
// META: script=../resources/utils.js
// META: timeout=long
@@ -7,10 +9,11 @@
// https://webmachinelearning.github.io/webnn/#api-mlbuffer
-testCreateWebNNBuffer("create", 4);
-
-testDestroyWebNNBuffer('destroyTwice');
-
-testReadWebNNBuffer('read');
-
-testWriteWebNNBuffer('write');
+if (navigator.ml) {
+ testCreateWebNNBuffer('create', 4);
+ testDestroyWebNNBuffer('destroyTwice');
+ testReadWebNNBuffer('read');
+ testWriteWebNNBuffer('write');
+} else {
+ test(() => assert_implements(navigator.ml, 'missing navigator.ml'));
+}