Title: [279192] trunk/LayoutTests/imported/w3c
Revision
279192
Author
[email protected]
Date
2021-06-23 15:04:40 -0700 (Wed, 23 Jun 2021)

Log Message

Resync IndexedDB WPT tests from upstream
https://bugs.webkit.org/show_bug.cgi?id=227315

Reviewed by Darin Adler.

Resync IndexedDB WPT tests from upstream a38612f39e7752c3532080c.

* web-platform-tests/IndexedDB/*: Updated.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-23 22:04:40 UTC (rev 279192)
@@ -1,5 +1,16 @@
 2021-06-23  Chris Dumez  <[email protected]>
 
+        Resync IndexedDB WPT tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=227315
+
+        Reviewed by Darin Adler.
+
+        Resync IndexedDB WPT tests from upstream a38612f39e7752c3532080c.
+
+        * web-platform-tests/IndexedDB/*: Updated.
+
+2021-06-23  Chris Dumez  <[email protected]>
+
         REGRESSION (r279169?): [MacOS] imported/w3c/web-platform-tests/html/semantics/embedded-content/the-video-element/video_timeupdate_on_seek.html is consistently failing.
         https://bugs.webkit.org/show_bug.cgi?id=227312
         <rdar://problem/79684170>

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit-throw.any.js (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit-throw.any.js	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit-throw.any.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -1,13 +1,5 @@
 // META: script=support-promises.js
 
-/**
- * This file contains a test that was separated out from the rest of the idb
- * explict commit tests because it requires the flag 'allow_uncaught_exception',
- * which prevents unintentionally thrown errors from failing tests.
- *
- * @author [email protected]
- */
-
 setup({allow_uncaught_exception:true});
 
 promise_test(async testCase => {

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit.any.js (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit.any.js	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idb-explicit-commit.any.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -1,12 +1,5 @@
 // META: script=support-promises.js
 
-/**
- * This file contains the webplatform tests for the explicit commit() method
- * of the IndexedDB transaction API.
- *
- * @author [email protected]
- */
-
 promise_test(async testCase => {
   const db = await createDatabase(testCase, db => {
     createBooksStore(testCase, db);

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any-expected.txt (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any-expected.txt	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,3 @@
+
+PASS Index cursor - indexed values updated during iteration
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.html (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.html	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.js (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,43 @@
+// META: script=support-promises.js
+
+promise_test(async t => {
+  const db = await createDatabase(t, db => {
+    const store = db.createObjectStore('store');
+    store.createIndex('index', 'value');
+    store.put({value: 1}, 1);
+    store.put({value: 2}, 2);
+    store.put({value: 3}, 3);
+  });
+
+  {
+    // Iterate over all index entries until an upper bound is reached.
+    // On each record found, increment the value used as the index
+    // key, which will make it show again up later in the iteration.
+    const tx = db.transaction('store', 'readwrite');
+    const range = IDBKeyRange.upperBound(9);
+    const index = tx.objectStore('store').index('index');
+    const request = index.openCursor(range);
+    request._onsuccess_ = t.step_func(e => {
+      const cursor = e.target.result;
+      if (!cursor)
+        return;
+
+      const record = cursor.value;
+      record.value += 1;
+      cursor.update(record);
+
+      cursor.continue();
+    });
+
+    await promiseForTransaction(t, tx);
+  }
+
+  {
+    const tx = db.transaction('store', 'readonly');
+    const results = await promiseForRequest(t, tx.objectStore('store').getAll());
+    assert_array_equals(
+      results.map(record => record.value),
+      [10, 10, 10],
+      'Values should all be incremented until bound reached');
+  }
+}, 'Index cursor - indexed values updated during iteration');

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker-expected.txt (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker-expected.txt	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,3 @@
+
+PASS Index cursor - indexed values updated during iteration
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker.html (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.worker.html	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any-expected.txt (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any-expected.txt	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,12 @@
+
+FAIL Data can be successfully inserted into an object store using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)"
+FAIL Values with array keys can be successfully inserted into an object store using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)"
+FAIL Inserting an empty list using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([])', 'objectStore.putAllValues' is undefined)"
+FAIL Empty values can be inserted into an objectstore with a key generator using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([{}, {}, {}])', 'objectStore.putAllValues' is undefined)"
+FAIL Attempting to insert with a read only transaction using putAll throws a ReadOnlyError. assert_throws_dom: The transaction is readonly function "() => { objectStore.putAllValues([{}]); }" threw object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([{}])', 'objectStore.putAllValues' is undefined)" that is not a DOMException ReadOnlyError: property "code" is equal to undefined, expected 0
+FAIL Inserting duplicate unique keys into a store that already has the keyusing putAll throws a ConstraintError. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([
+    {isbn: 2, title: "duplicate"},
+    {isbn: 3, title: "duplicate"}
+  ])', 'objectStore.putAllValues' is undefined)"
+FAIL Inserting values without the key into an object store that does not have generated keys throws an exception. assert_throws_dom: Evaluating the object store's key path did not yield a value function "() => { const putAllRequest = objectStore.putAllValues(values); }" threw object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)" that is not a DOMException DataError: property "code" is equal to undefined, expected 0
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.html (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.html	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.js (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.js	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,180 @@
+// META: script=support-promises.js
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const values = [
+    {isbn: 'one', title: 'title1'},
+    {isbn: 'two', title: 'title2'},
+    {isbn: 'three', title: 'title3'}
+  ];
+  const putAllRequest = objectStore.putAllValues(values);
+  // TODO(nums): Check that correct keys are returned.
+  await promiseForRequest(testCase, putAllRequest);
+  await promiseForTransaction(testCase, txn);
+
+  const txn2 = db.transaction(['books'], 'readonly');
+  const objectStore2 = txn2.objectStore('books');
+  const getRequest1 = objectStore2.get('one');
+  const getRequest2 = objectStore2.get('two');
+  const getRequest3 = objectStore2.get('three');
+  await promiseForTransaction(testCase, txn2);
+  assert_array_equals(
+      [getRequest1.result.title,
+          getRequest2.result.title,
+          getRequest3.result.title],
+      ['title1', 'title2', 'title3'],
+      'All three retrieved titles should match those that were put.');
+  db.close();
+}, 'Data can be successfully inserted into an object store using putAll.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const values = [
+    {isbn: ['one', 'two', 'three'], title: 'title1'},
+    {isbn: ['four', 'five', 'six'], title: 'title2'},
+    {isbn: ['seven', 'eight', 'nine'], title: 'title3'}
+  ];
+  const putAllRequest = objectStore.putAllValues(values);
+  // TODO(nums): Check that correct keys are returned.
+  await promiseForRequest(testCase, putAllRequest);
+  await promiseForTransaction(testCase, txn);
+
+  const txn2 = db.transaction(['books'], 'readonly');
+  const objectStore2 = txn2.objectStore('books');
+  const getRequest1 = objectStore2.get(['one', 'two', 'three']);
+  const getRequest2 = objectStore2.get(['four', 'five', 'six']);
+  const getRequest3 = objectStore2.get(['seven', 'eight', 'nine']);
+  await promiseForTransaction(testCase, txn2);
+  assert_array_equals(
+      [getRequest1.result.title,
+          getRequest2.result.title,
+          getRequest3.result.title],
+      ['title1', 'title2', 'title3'],
+      'All three retrieved titles should match those that were put.');
+  db.close();
+}, 'Values with array keys can be successfully inserted into an object'
+    + ' store using putAll.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const putAllRequest = objectStore.putAllValues([]);
+  await promiseForRequest(testCase, putAllRequest);
+  await promiseForTransaction(testCase, txn);
+  // TODO(nums): Check that an empty key array is returned.
+  db.close();
+}, 'Inserting an empty list using putAll.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const putAllRequest = objectStore.putAllValues([{}, {}, {}]);
+  // TODO(nums): Check that correct keys are returned.
+  await promiseForRequest(testCase, putAllRequest);
+  await promiseForTransaction(testCase, txn);
+
+  const txn2 = db.transaction(['books'], 'readonly');
+  const objectStore2 = txn2.objectStore('books');
+  const getRequest1 = objectStore2.get(1);
+  const getRequest2 = objectStore2.get(2);
+  const getRequest3 = objectStore2.get(3);
+  await Promise.all([
+    promiseForRequest(testCase, getRequest1),
+    promiseForRequest(testCase, getRequest2),
+    promiseForRequest(testCase, getRequest3),
+  ]);
+  db.close();
+}, 'Empty values can be inserted into an objectstore'
+    + ' with a key generator using putAll.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readonly');
+  const objectStore = txn.objectStore('books');
+  assert_throws_dom('ReadOnlyError',
+    () => { objectStore.putAllValues([{}]); },
+    'The transaction is readonly');
+  db.close();
+}, 'Attempting to insert with a read only transaction using putAll throws a '
+    + 'ReadOnlyError.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStore(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const putRequest = await objectStore.put({isbn: 1, title: "duplicate"});
+  await promiseForRequest(testCase, putRequest);
+  const putAllRequest = objectStore.putAllValues([
+    {isbn: 2, title: "duplicate"},
+    {isbn: 3, title: "duplicate"}
+  ]);
+  const errorEvent = await requestWatcher(testCase,
+                                        putAllRequest).wait_for('error');
+  assert_equals(errorEvent.target.error.name, "ConstraintError");
+  errorEvent.preventDefault();
+  // The transaction still receives the error event even though it
+  // isn't aborted.
+  await transactionWatcher(testCase, txn).wait_for(['error', 'complete']);
+
+  const txn2 = db.transaction(['books'], 'readonly');
+  const objectStore2 = txn2.objectStore('books');
+  const getRequest1 = objectStore2.get(1);
+  const getRequest2 = objectStore2.get(2);
+  const getRequest3 = objectStore2.get(3);
+  await promiseForTransaction(testCase, txn2);
+  assert_array_equals(
+      [getRequest1.result.title, getRequest2.result, getRequest3.result],
+      ["duplicate", undefined, undefined],
+      'None of the values should have been inserted.');
+  db.close();
+}, 'Inserting duplicate unique keys into a store that already has the key'
+    + 'using putAll throws a ConstraintError.');
+
+promise_test(async testCase => {
+  const db = await createDatabase(testCase, db => {
+    const store = createBooksStoreWithoutAutoIncrement(testCase, db);
+  });
+  const txn = db.transaction(['books'], 'readwrite');
+  const objectStore = txn.objectStore('books');
+  const values = [
+    {title: "title1", isbn: 1},
+    {title: "title2"}
+  ];
+  assert_throws_dom('DataError',
+    () => { const putAllRequest = objectStore.putAllValues(values); },
+    "Evaluating the object store's key path did not yield a value");
+
+  const txn2 = db.transaction(['books'], 'readonly');
+  const objectStore2 = txn2.objectStore('books');
+  const getRequest1 = objectStore2.get(1);
+  const getRequest2 = objectStore2.get(2);
+  await promiseForTransaction(testCase, txn2);
+  assert_array_equals(
+      [getRequest1.result, getRequest2.result],
+      [undefined, undefined],
+      'No data should have been inserted');
+  db.close();
+}, 'Inserting values without the key into an object store that'
+    + ' does not have generated keys throws an exception.');
+
+// TODO(nums): Add test for insertion into multi entry indexes
+// TODO(nums): Add test for inserting unique keys into a store
+// that doesn't already have the key https://crbug.com/1115649

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker-expected.txt (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker-expected.txt	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,12 @@
+
+FAIL Data can be successfully inserted into an object store using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)"
+FAIL Values with array keys can be successfully inserted into an object store using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)"
+FAIL Inserting an empty list using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([])', 'objectStore.putAllValues' is undefined)"
+FAIL Empty values can be inserted into an objectstore with a key generator using putAll. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([{}, {}, {}])', 'objectStore.putAllValues' is undefined)"
+FAIL Attempting to insert with a read only transaction using putAll throws a ReadOnlyError. assert_throws_dom: The transaction is readonly function "() => { objectStore.putAllValues([{}]); }" threw object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([{}])', 'objectStore.putAllValues' is undefined)" that is not a DOMException ReadOnlyError: property "code" is equal to undefined, expected 0
+FAIL Inserting duplicate unique keys into a store that already has the keyusing putAll throws a ConstraintError. promise_test: Unhandled rejection with value: object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues([
+    {isbn: 2, title: "duplicate"},
+    {isbn: 3, title: "duplicate"}
+  ])', 'objectStore.putAllValues' is undefined)"
+FAIL Inserting values without the key into an object store that does not have generated keys throws an exception. assert_throws_dom: Evaluating the object store's key path did not yield a value function "() => { const putAllRequest = objectStore.putAllValues(values); }" threw object "TypeError: objectStore.putAllValues is not a function. (In 'objectStore.putAllValues(values)', 'objectStore.putAllValues' is undefined)" that is not a DOMException DataError: property "code" is equal to undefined, expected 0
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker.html (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.worker.html	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https-expected.txt	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,3 @@
+
+FAIL IndexedDB: Attempting to serialize a SharedArrayBuffer should throw assert_true: The page is served with COOP and COEP, it should be cross-origin-isolated. expected true got undefined
+

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>IndexedDB: Attempting to serialize a SharedArrayBuffer should throw</title>
+<script src=""
+<script src=""
+<script src=""
+<script>
+  async_test(function(t) {
+
+    // The SAB constructor throws if the page is not cross-origin-isolated.
+    assert_true(self.crossOriginIsolated,
+                "The page is served with COOP and COEP, it should be cross-origin-isolated.");
+
+    let open_rq = createdb(t);
+    open_rq._onupgradeneeded_ = function(e) {
+        let db = e.target.result;
+        let objStore = db.createObjectStore("test", { keyPath:"pKey" });
+
+        let sab = new SharedArrayBuffer(256);
+
+        let rq;
+        assert_throws_dom("DataCloneError", () => {
+            rq = objStore.put({sab: sab}, 'key');
+        });
+        assert_equals(rq, undefined);
+        t.done();
+    };
+  });
+</script>

Added: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers (0 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers	                        (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers	2021-06-23 22:04:40 UTC (rev 279192)
@@ -0,0 +1,2 @@
+Cross-Origin-Embedder-Policy: require-corp
+Cross-Origin-Opener-Policy: same-origin

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.js (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.js	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -15,7 +15,7 @@
 function describe(value) {
   let type, str;
   if (typeof value === 'object' && value) {
-    type = value.__proto__.constructor.name;
+    type = Object.getPrototypeOf(value).constructor.name;
     // Handle Number(-0), etc.
     str = Object.is(value.valueOf(), -0) ? '-0' : String(value);
   } else {
@@ -54,7 +54,7 @@
   cloneTest(value, async (orig, clone) => {
     assert_not_equals(orig, clone);
     assert_equals(typeof clone, 'object');
-    assert_equals(orig.__proto__, clone.__proto__);
+    assert_equals(Object.getPrototypeOf(orig), Object.getPrototypeOf(clone));
     await verifyFunc(orig, clone);
   });
 }
@@ -141,7 +141,7 @@
 ].forEach(value => cloneTest(value, (orig, clone) => {
     assert_not_equals(orig, clone);
     assert_equals(typeof clone, 'object');
-    assert_equals(orig.__proto__, clone.__proto__);
+    assert_equals(Object.getPrototypeOf(orig), Object.getPrototypeOf(clone));
     assert_equals(orig.valueOf(), clone.valueOf());
   }));
 
@@ -261,7 +261,7 @@
   new DOMRect,
   new DOMRectReadOnly(),
 ].forEach(value => cloneObjectTest(value, (orig, clone) => {
-  Object.keys(orig.__proto__).forEach(key => {
+  Object.keys(Object.getPrototypeOf(orig)).forEach(key => {
     assert_equals(orig[key], clone[key], `Property ${key}`);
   });
 }));

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/support-promises.js (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/support-promises.js	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/support-promises.js	2021-06-23 22:04:40 UTC (rev 279192)
@@ -196,11 +196,23 @@
       { keyPath: 'isbn', autoIncrement: true });
   store.createIndex('by_author', 'author');
   store.createIndex('by_title', 'title', { unique: true });
-  for (let record of BOOKS_RECORD_DATA)
+  for (const record of BOOKS_RECORD_DATA)
       store.put(record);
   return store;
 }
 
+// Creates a 'books' object store whose contents closely resembles the first
+// example in the IndexedDB specification, just without autoincrementing.
+const createBooksStoreWithoutAutoIncrement = (testCase, database) => {
+  const store = database.createObjectStore('books',
+      { keyPath: 'isbn' });
+  store.createIndex('by_author', 'author');
+  store.createIndex('by_title', 'title', { unique: true });
+  for (const record of BOOKS_RECORD_DATA)
+      store.put(record);
+  return store;
+}
+
 // Creates a 'not_books' object store used to test renaming into existing or
 // deleted store names.
 function createNotBooksStore(testCase, database) {

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/w3c-import.log (279191 => 279192)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/w3c-import.log	2021-06-23 22:03:18 UTC (rev 279191)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/w3c-import.log	2021-06-23 22:04:40 UTC (rev 279192)
@@ -120,6 +120,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index6.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index7.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index8.htm
+/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_index9.any.js
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_objectstore.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_objectstore2.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbcursor_update_objectstore3.htm
@@ -323,6 +324,7 @@
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_put7.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_put8.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_put9.htm
+/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_putall.tentative.any.js
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbrequest-onupgradeneeded.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbrequest_error.html
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbrequest_result.html
@@ -367,6 +369,8 @@
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/request-abort-ordering.html
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/request-event-ordering.html
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/request_bubble-and-capture.htm
+/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html
+/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/serialize-sharedarraybuffer-throws.https.html.headers
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/string-list-ordering.htm
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone-transaction-state.any.js
 /LayoutTests/imported/w3c/web-platform-tests/IndexedDB/structured-clone.any.js
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to