summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/IndexedDB
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/IndexedDB')
-rw-r--r--testing/web-platform/tests/IndexedDB/idb-binary-key-detached.htm4
-rw-r--r--testing/web-platform/tests/IndexedDB/idb-binary-key-roundtrip.htm1
-rw-r--r--testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html2
-rw-r--r--testing/web-platform/tests/IndexedDB/structured-clone.any.js11
4 files changed, 13 insertions, 5 deletions
diff --git a/testing/web-platform/tests/IndexedDB/idb-binary-key-detached.htm b/testing/web-platform/tests/IndexedDB/idb-binary-key-detached.htm
index ac6fc2ef98..a4ce3fbce0 100644
--- a/testing/web-platform/tests/IndexedDB/idb-binary-key-detached.htm
+++ b/testing/web-platform/tests/IndexedDB/idb-binary-key-detached.htm
@@ -23,7 +23,7 @@ indexeddb_test(
worker.postMessage('', [buffer]);
assert_equals(array.byteLength, 0);
- assert_throws_js(TypeError, () => { store.put('', buffer); });
+ assert_throws_dom("DataError", () => { store.put('', buffer); });
t.done();
},
'Detached ArrayBuffer'
@@ -43,7 +43,7 @@ indexeddb_test(
worker.postMessage('', [array.buffer]);
assert_equals(array.length, 0);
- assert_throws_js(TypeError, () => { store.put('', array); });
+ assert_throws_dom("DataError", () => { store.put('', array); });
t.done();
},
'Detached TypedArray'
diff --git a/testing/web-platform/tests/IndexedDB/idb-binary-key-roundtrip.htm b/testing/web-platform/tests/IndexedDB/idb-binary-key-roundtrip.htm
index de3889a71c..d1bf4016f9 100644
--- a/testing/web-platform/tests/IndexedDB/idb-binary-key-roundtrip.htm
+++ b/testing/web-platform/tests/IndexedDB/idb-binary-key-roundtrip.htm
@@ -83,6 +83,7 @@ function view_type_test(type) {
'Int16Array',
'Uint32Array',
'Int32Array',
+ 'Float16Array',
'Float32Array',
'Float64Array'
].forEach((type) => { view_type_test(type); });
diff --git a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html
index 613ddfe99d..bff63fad8d 100644
--- a/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html
+++ b/testing/web-platform/tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html
@@ -13,7 +13,7 @@
let open_rq = createdb(t);
open_rq.onupgradeneeded = function(e) {
let db = e.target.result;
- let objStore = db.createObjectStore("test", { keyPath:"pKey" });
+ let objStore = db.createObjectStore("test");
let sab = new SharedArrayBuffer(256);
diff --git a/testing/web-platform/tests/IndexedDB/structured-clone.any.js b/testing/web-platform/tests/IndexedDB/structured-clone.any.js
index 15ab0359e2..8ab73ac57a 100644
--- a/testing/web-platform/tests/IndexedDB/structured-clone.any.js
+++ b/testing/web-platform/tests/IndexedDB/structured-clone.any.js
@@ -169,7 +169,7 @@ cloneObjectTest(new Uint8Array([0, 1, 254, 255]).buffer, (orig, clone) => {
// TODO SharedArrayBuffer
// Array Buffer Views
-[
+let byteArrays = [
new Uint8Array([]),
new Uint8Array([0, 1, 254, 255]),
new Uint16Array([0x0000, 0x0001, 0xFFFE, 0xFFFF]),
@@ -181,7 +181,14 @@ cloneObjectTest(new Uint8Array([0, 1, 254, 255]).buffer, (orig, clone) => {
new Float32Array([-Infinity, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, Infinity, NaN]),
new Float64Array([-Infinity, -Number.MAX_VALUE, -Number.MIN_VALUE, 0,
Number.MIN_VALUE, Number.MAX_VALUE, Infinity, NaN])
-].forEach(value => cloneObjectTest(value, (orig, clone) => {
+]
+
+if (typeof Float16Array !== 'undefined') {
+ byteArrays.push(
+ new Float16Array([-Infinity, -1.5, -1, -0.5, 0, 0.5, 1, 1.5, Infinity, NaN]));
+}
+
+byteArrays.forEach(value => cloneObjectTest(value, (orig, clone) => {
assert_array_equals(orig, clone);
}));