Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Unified Diff: third_party/WebKit/LayoutTests/storage/indexeddb/shared-array-buffer-throws.html

Issue 2838783002: SharedArrayBuffer throws serializing to indexeddb (Closed)
Patch Set: add for_storage_ comment Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698