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

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

Issue 2838783002: SharedArrayBuffer throws serializing to indexeddb (Closed)
Patch Set: forgot README Created 3 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: Attempting to serialize a SharedArrayBuffer should throw</titl e>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script>
6
7 if (window.SharedArrayBuffer) {
8 async_test(t => {
9 const sab = new SharedArrayBuffer('256');
jbroman 2017/04/25 17:37:23 nit: It's rather weird to pass a string here, give
binji 2017/04/25 18:06:26 Heh, I noticed this too :) Done.
10 const open = indexedDB.open('db');
jsbell 2017/04/25 00:27:48 I know I gave you the sample code in the bug, but
binji 2017/04/25 17:37:18 Done.
11 open.onupgradeneeded = t.step_func(e => {
12 const db = open.result;
13 db.createObjectStore('store');
14 });
15 open.onsuccess = t.step_func_done(e => {
16 const db = open.result;
17 const tx = db.transaction('store', 'readwrite');
18 const store = tx.objectStore('store');
19
20 assert_throws("DataCloneError", () => {
21 store.put({sab: sab}, 'key');
22 });
23 });
24 }, 'Serializing SharedArrayBuffer throws DataClone error.');
25 } else {
26 done();
jbroman 2017/04/25 17:37:23 nit: I don't think you need to explicitly call don
binji 2017/04/25 18:06:26 Hm, the non-virtual testsuite version hangs when I
jbroman 2017/04/25 18:09:42 Acknowledged.
27 }
28
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698