Commit c9e36f7d authored by Joshua Bell's avatar Joshua Bell Committed by Commit Bot

IndexedDB WPT: Shard slow test

The structured-clone-any.js test is slow as it creates a new database
for each of over a hundred test cases, leading to long (>20s) run
times on debug builds. This would lead to occasional timeouts.

Use the WPT "variant" mechanism and shard the test down to just 20
cases per shard, which drops the test times down to just a few seconds
each (on debug builds).

Bug: 991415
Change-Id: I5fa792ea0042c7ff6ea29d926a459c625958d10d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036957
Auto-Submit: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Jarryd Goodman <jarrydg@chromium.org>
Reviewed-by: default avatarJarryd Goodman <jarrydg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738655}
parent f634f03a
// META: script=support-promises.js
// META: title=Indexed DB and Structured Serializing/Deserializing
// META: timeout=long
// META: script=support-promises.js
// META: script=/common/subset-tests.js
// META: variant=?1-20
// META: variant=?21-40
// META: variant=?41-60
// META: variant=?61-80
// META: variant=?81-100
// META: variant=?101-last
// Tests Indexed DB coverage of HTML's Safe "passing of structured data"
// https://html.spec.whatwg.org/multipage/structured-data.html
......@@ -20,7 +27,7 @@ function describe(value) {
}
function cloneTest(value, verifyFunc) {
promise_test(async t => {
subsetTest(promise_test, async t => {
const db = await createDatabase(t, db => {
const store = db.createObjectStore('store');
// This index is not used, but evaluating key path on each put()
......@@ -53,7 +60,7 @@ function cloneObjectTest(value, verifyFunc) {
}
function cloneFailureTest(value) {
promise_test(async t => {
subsetTest(promise_test, async t => {
const db = await createDatabase(t, db => {
db.createObjectStore('store');
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment