Index: third_party/WebKit/LayoutTests/storage/indexeddb/shared-array-buffer-throws.html |
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/shared-array-buffer-throws.html b/third_party/WebKit/LayoutTests/storage/indexeddb/shared-array-buffer-throws.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..07a60c87deead11b97af8364f60a96d7e3b953d6 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/storage/indexeddb/shared-array-buffer-throws.html |
@@ -0,0 +1,28 @@ |
+<!DOCTYPE html> |
+<title>IndexedDB: Attempting to serialize a SharedArrayBuffer should throw</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="resources/testharness-helpers.js"></script> |
+<script> |
+ |
+if (window.SharedArrayBuffer) { |
+ indexeddb_test( |
+ (t, db) => { |
+ db.createObjectStore('store'); |
+ }, |
+ (t, db) => { |
+ const sab = new SharedArrayBuffer(256); |
+ const tx = db.transaction('store', 'readwrite'); |
+ const store = tx.objectStore('store'); |
+ |
+ assert_throws("DataCloneError", () => { |
+ store.put({sab: sab}, 'key'); |
+ }); |
+ t.done(); |
+ }, |
+ 'Serializing SharedArrayBuffer throws DataClone error.'); |
+} else { |
+ done(); |
+} |
+ |
+</script> |