diff --git a/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-navigation.tentative.https.html.ini b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-navigation.tentative.https.html.ini new file mode 100644 index 00000000000..575e16729cb --- /dev/null +++ b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-navigation.tentative.https.html.ini @@ -0,0 +1,2 @@ +[cross-partition-navigation.tentative.https.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-worker-creation.tentative.https.html.ini b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-worker-creation.tentative.https.html.ini new file mode 100644 index 00000000000..06d580aa061 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition-worker-creation.tentative.https.html.ini @@ -0,0 +1,2 @@ +[cross-partition-worker-creation.tentative.https.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition.tentative.https.html.ini b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition.tentative.https.html.ini new file mode 100644 index 00000000000..5f8ed6cf262 --- /dev/null +++ b/tests/wpt/meta-legacy-layout/FileAPI/BlobURL/cross-partition.tentative.https.html.ini @@ -0,0 +1,2 @@ +[cross-partition.tentative.https.html] + expected: TIMEOUT diff --git a/tests/wpt/meta-legacy-layout/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/meta-legacy-layout/FileAPI/url/url-in-tags-revoke.window.js.ini index 282ab0b2525..35fe4fd6e0d 100644 --- a/tests/wpt/meta-legacy-layout/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/meta-legacy-layout/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -14,3 +14,6 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: TIMEOUT + + [Fetching a blob URL immediately before revoking it works in - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.any.js new file mode 100644 index 00000000000..bd87686af88 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.any.js @@ -0,0 +1,103 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBCursor advance() Exception Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbcursor-advance + +'use strict'; + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + store.put('value', 'key'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + const r = store.openKeyCursor(); + r.onsuccess = t.step_func(() => { + r.onsuccess = null; + + const cursor = r.result; + + setTimeout( + t.step_func(() => { + assert_throws_js( + TypeError, + () => { + cursor.advance(0); + }, + '"zero" check (TypeError) should precede ' + + '"not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }); + }, + 'IDBCursor.advance exception order: TypeError vs. TransactionInactiveError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + + const s = db.createObjectStore('s2'); + s.put('value', 'key'); + + const r = s.openKeyCursor(); + r.onsuccess = t.step_func(() => { + r.onsuccess = null; + + const cursor = r.result; + db.deleteObjectStore('s2'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + cursor.advance(1); + }, + '"not active" check (TransactionInactiveError) ' + + 'should precede "deleted" check (InvalidStateError)'); + t.done(); + }), + 0); + }); + }, + (t, db) => {}, + 'IDBCursor.advance exception order: ' + + 'TransactionInactiveError vs. InvalidStateError #1'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + store.put('value', 'key'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + const r = store.openKeyCursor(); + r.onsuccess = t.step_func(() => { + r.onsuccess = null; + + const cursor = r.result; + cursor.advance(1); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + cursor.advance(1); + }, + '"not active" check (TransactionInactiveError) ' + + 'should precede "got value" check (InvalidStateError)'); + t.done(); + }), + 0); + }); + }, + 'IDBCursor.advance exception order: ' + + 'TransactionInactiveError vs. InvalidStateError #2'); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.html b/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.html deleted file mode 100644 index 1abbc9acc2a..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-advance-exception-order.html +++ /dev/null @@ -1,91 +0,0 @@ - - -IndexedDB: IDBCursor advance() Exception Ordering - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.any.js b/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.any.js new file mode 100644 index 00000000000..3d6ff1638fc --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.any.js @@ -0,0 +1,196 @@ +// META: global=window,worker +// META: title=IDBCursor.advance() - invalid +// META: script=resources/support.js + +// Spec: +// https://w3c.github.io/IndexedDB/#widl-IDBCursor-advance-void-unsigned-long-count + +'use strict'; + +function upgrade_func(t, db, tx) { + let objStore = db.createObjectStore('test'); + objStore.createIndex('index', ''); + + objStore.add('data', 1); + objStore.add('data2', 2); +} + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 2, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + cursor.advance(1); + + // Second try + assert_throws_dom('InvalidStateError', function() { + cursor.advance(1); + }, 'second advance'); + + assert_throws_dom('InvalidStateError', function() { + cursor.advance(3); + }, 'third advance'); + + count++; + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - attempt to call advance twice'); + +indexeddb_test(upgrade_func, function(t, db) { + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_throws_js(TypeError, function() { + cursor.advance(self); + }); + + assert_throws_js(TypeError, function() { + cursor.advance({}); + }); + + assert_throws_js(TypeError, function() { + cursor.advance([]); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(''); + }); + + assert_throws_js(TypeError, function() { + cursor.advance('1 2'); + }); + + t.done(); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - pass something other than number'); + + +indexeddb_test(upgrade_func, function(t, db) { + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_throws_js(TypeError, function() { + cursor.advance(null); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(undefined); + }); + + let mylet = null; + assert_throws_js(TypeError, function() { + cursor.advance(mylet); + }); + + t.done(); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - pass null/undefined'); + + +indexeddb_test(upgrade_func, function(t, db) { + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_throws_js(TypeError, function() { + cursor.advance(); + }); + + t.done(); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - missing argument'); + +indexeddb_test(upgrade_func, function(t, db) { + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_throws_js(TypeError, function() { + cursor.advance(-1); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(NaN); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(0); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(-0); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(Infinity); + }); + + assert_throws_js(TypeError, function() { + cursor.advance(-Infinity); + }); + + let mylet = -999999; + assert_throws_js(TypeError, function() { + cursor.advance(mylet); + }); + + t.done(); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - pass negative numbers'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + if (!cursor) { + assert_equals(count, 2, 'count runs'); + t.done(); + return; + } + + assert_throws_js(TypeError, function() { + cursor.advance(0); + }); + + cursor.advance(1); + count++; + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - invalid - got value not set on exception'); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.htm b/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.htm deleted file mode 100644 index 4e8472efd59..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-advance-invalid.htm +++ /dev/null @@ -1,192 +0,0 @@ - -IDBCursor.advance() - invalid - - - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance.any.js b/tests/wpt/tests/IndexedDB/idbcursor-advance.any.js new file mode 100644 index 00000000000..576d0ec6671 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-advance.any.js @@ -0,0 +1,232 @@ +// META: global=window,worker +// META: title=IDBCursor.advance() +// META: script=resources/support.js + +'use strict'; + +function upgrade_func(t, db, tx) { + let objStore = db.createObjectStore('test'); + objStore.createIndex('index', ''); + + objStore.add('cupcake', 5); + objStore.add('pancake', 3); + objStore.add('pie', 1); + objStore.add('pie', 4); + objStore.add('taco', 2); +} + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 3, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'cupcake'); + assert_equals(cursor.primaryKey, 5); + break; + + case 1: + assert_equals(cursor.value, 'pie'); + assert_equals(cursor.primaryKey, 1); + break; + + case 2: + assert_equals(cursor.value, 'taco'); + assert_equals(cursor.primaryKey, 2); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(2); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - advances'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(null, 'prev'); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 3, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'taco'); + assert_equals(cursor.primaryKey, 2); + break; + + case 1: + assert_equals(cursor.value, 'pie'); + assert_equals(cursor.primaryKey, 1); + break; + + case 2: + assert_equals(cursor.value, 'cupcake'); + assert_equals(cursor.primaryKey, 5); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(2); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - advances backwards'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 1, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'cupcake'); + assert_equals(cursor.primaryKey, 5); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(100000); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - skip far forward'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor(IDBKeyRange.lowerBound('cupcake', true)); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 2, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'pancake'); + assert_equals(cursor.primaryKey, 3); + break; + + case 1: + assert_equals(cursor.value, 'pie'); + assert_equals(cursor.primaryKey, 4); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(2); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - within range'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor('pancake'); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 1, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'pancake'); + assert_equals(cursor.primaryKey, 3); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(1); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - within single key range'); + +indexeddb_test(upgrade_func, function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('index') + .openCursor('pie'); + + rq.onsuccess = t.step_func(function(e) { + if (!e.target.result) { + assert_equals(count, 2, 'count'); + t.done(); + return; + } + let cursor = e.target.result; + + switch (count) { + case 0: + assert_equals(cursor.value, 'pie'); + assert_equals(cursor.primaryKey, 1); + break; + + case 1: + assert_equals(cursor.value, 'pie'); + assert_equals(cursor.primaryKey, 4); + break; + + default: + assert_unreached('Unexpected count: ' + count); + } + + count++; + cursor.advance(1); + }); + rq.onerror = t.unreached_func('unexpected error'); +}, 'IDBCursor.advance() - within single key range, with several results'); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-advance.htm b/tests/wpt/tests/IndexedDB/idbcursor-advance.htm deleted file mode 100644 index c72ac2f16f4..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-advance.htm +++ /dev/null @@ -1,247 +0,0 @@ - -IDBCursor.advance() - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.any.js b/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.any.js new file mode 100644 index 00000000000..0437ce2004e --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.any.js @@ -0,0 +1,55 @@ +// META: global=window,worker +// META: title=IDBCursor direction - index with keyrange +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#cursor-iteration-operation + +'use strict'; + +let records = [1337, 'Alice', 'Bob', 'Bob', 'Greg', 'Åke', ['Anne']]; +let cases = [ + {dir: 'next', expect: ['Alice:1', 'Bob:2', 'Bob:3', 'Greg:4']}, + {dir: 'prev', expect: ['Greg:4', 'Bob:3', 'Bob:2', 'Alice:1']}, + {dir: 'nextunique', expect: ['Alice:1', 'Bob:2', 'Greg:4']}, + {dir: 'prevunique', expect: ['Greg:4', 'Bob:2', 'Alice:1']} +]; + +cases.forEach(function(testcase) { + let dir = testcase.dir; + let expect = testcase.expect; + indexeddb_test( + function(t, db, tx) { + let objStore = db.createObjectStore('test'); + objStore.createIndex('idx', 'name'); + + for (let i = 0; i < records.length; i++) { + objStore.add({name: records[i]}, i); + } + }, + function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('idx') + .openCursor(IDBKeyRange.bound('AA', 'ZZ'), dir); + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + if (!cursor) { + assert_equals(count, expect.length, 'cursor runs'); + t.done(); + return; + } + assert_equals( + cursor.value.name + ':' + cursor.primaryKey, expect[count], + 'cursor.value'); + count++; + cursor.continue(); + }); + rq.onerror = t.step_func(function(e) { + e.preventDefault(); + e.stopPropagation(); + assert_unreached('rq.onerror - ' + e.message); + }); + }, + 'IDBCursor direction - index with keyrange - ' + dir); +}); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.htm b/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.htm deleted file mode 100644 index c26997c9ff3..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-direction-index-keyrange.htm +++ /dev/null @@ -1,60 +0,0 @@ - - -IDBCursor direction - index with keyrange - - - - - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-index.any.js b/tests/wpt/tests/IndexedDB/idbcursor-direction-index.any.js new file mode 100644 index 00000000000..d573bf5932d --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-direction-index.any.js @@ -0,0 +1,53 @@ +// META: global=window,worker +// META: title=IDBCursor direction - index +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#cursor-iteration-operation + +'use strict'; + +let records = ['Alice', 'Bob', 'Bob', 'Greg']; +let cases = [ + {dir: 'next', expect: ['Alice:0', 'Bob:1', 'Bob:2', 'Greg:3']}, + {dir: 'prev', expect: ['Greg:3', 'Bob:2', 'Bob:1', 'Alice:0']}, + {dir: 'nextunique', expect: ['Alice:0', 'Bob:1', 'Greg:3']}, + {dir: 'prevunique', expect: ['Greg:3', 'Bob:1', 'Alice:0']}, +]; + +cases.forEach(function(testcase) { + let dir = testcase.dir; + let expect = testcase.expect; + indexeddb_test( + function(t, db, tx) { + let objStore = db.createObjectStore('test'); + objStore.createIndex('idx', 'name'); + + for (let i = 0; i < records.length; i++) + objStore.add({name: records[i]}, i); + }, + function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .index('idx') + .openCursor(undefined, dir); + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + if (!cursor) { + assert_equals(count, expect.length, 'cursor runs'); + t.done(); + } + assert_equals( + cursor.value.name + ':' + cursor.primaryKey, expect[count], + 'cursor.value'); + count++; + cursor.continue(); + }); + rq.onerror = t.step_func(function(e) { + e.preventDefault(); + e.stopPropagation(); + assert_unreached('rq.onerror - ' + e.message); + }); + }, + 'IDBCursor direction - index - ' + dir); +}); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-index.htm b/tests/wpt/tests/IndexedDB/idbcursor-direction-index.htm deleted file mode 100644 index a2adeb73d6b..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-direction-index.htm +++ /dev/null @@ -1,57 +0,0 @@ - -IDBCursor direction - index - - - - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.any.js b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.any.js new file mode 100644 index 00000000000..ad5ddc70bab --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.any.js @@ -0,0 +1,49 @@ +// META: global=window,worker +// META: title=IDBCursor direction - object store with keyrange +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#cursor-iteration-operation + +'use strict'; + +let records = [1337, 'Alice', 'Bob', 'Greg', 'Åke', ['Anne']]; +let directions = ['next', 'prev', 'nextunique', 'prevunique']; +let cases = [ + {dir: 'next', expect: ['Alice', 'Bob', 'Greg']}, + {dir: 'prev', expect: ['Greg', 'Bob', 'Alice']}, + {dir: 'nextunique', expect: ['Alice', 'Bob', 'Greg']}, + {dir: 'prevunique', expect: ['Greg', 'Bob', 'Alice']}, +]; + +cases.forEach(function(testcase) { + let dir = testcase.dir; + let expect = testcase.expect; + indexeddb_test( + function(t, db, tx) { + let objStore = db.createObjectStore('test'); + for (let i = 0; i < records.length; i++) + objStore.add(records[i], records[i]); + }, + function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .openCursor(IDBKeyRange.bound('AA', 'ZZ'), dir); + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + if (!cursor) { + assert_equals(count, expect.length, 'cursor runs'); + t.done(); + } + assert_equals(cursor.value, expect[count], 'cursor.value'); + count++; + cursor.continue(); + }); + rq.onerror = t.step_func(function(e) { + e.preventDefault(); + e.stopPropagation(); + assert_unreached('rq.onerror - ' + e.message); + }); + }, + 'IDBCursor direction - object store with keyrange - ' + dir); +}); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.htm b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.htm deleted file mode 100644 index e5b5a22de9d..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore-keyrange.htm +++ /dev/null @@ -1,54 +0,0 @@ - - -IDBCursor direction - object store with keyrange - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.any.js b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.any.js new file mode 100644 index 00000000000..6d3e67e252e --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.any.js @@ -0,0 +1,49 @@ +// META: global=window,worker +// META: title=IDBCursor direction - object store +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#cursor-iteration-operation + +'use strict'; + +let records = ['Alice', 'Bob', 'Greg']; +let directions = ['next', 'prev', 'nextunique', 'prevunique']; +let cases = [ + {dir: 'next', expect: ['Alice', 'Bob', 'Greg']}, + {dir: 'prev', expect: ['Greg', 'Bob', 'Alice']}, + {dir: 'nextunique', expect: ['Alice', 'Bob', 'Greg']}, + {dir: 'prevunique', expect: ['Greg', 'Bob', 'Alice']}, +]; + +cases.forEach(function(testcase) { + let dir = testcase.dir; + let expect = testcase.expect; + indexeddb_test( + function(t, db, tx) { + let objStore = db.createObjectStore('test'); + for (let i = 0; i < records.length; i++) + objStore.add(records[i], records[i]); + }, + function(t, db) { + let count = 0; + let rq = db.transaction('test', 'readonly') + .objectStore('test') + .openCursor(undefined, dir); + rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + if (!cursor) { + assert_equals(count, expect.length, 'cursor runs'); + t.done(); + } + assert_equals(cursor.value, expect[count], 'cursor.value'); + count++; + cursor.continue(); + }); + rq.onerror = t.step_func(function(e) { + e.preventDefault(); + e.stopPropagation(); + assert_unreached('rq.onerror - ' + e.message); + }); + }, + 'IDBCursor direction - object store - ' + dir); +}); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.htm b/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.htm deleted file mode 100644 index cac1a589d78..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-direction-objectstore.htm +++ /dev/null @@ -1,56 +0,0 @@ - -IDBCursor direction - object store - - - - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction.any.js b/tests/wpt/tests/IndexedDB/idbcursor-direction.any.js new file mode 100644 index 00000000000..e65fc287c46 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbcursor-direction.any.js @@ -0,0 +1,70 @@ +// META: global=window,worker +// META: title=IDBCursor.direction +// META: script=resources/support.js + +'use strict'; + +function cursor_direction(constant, dir) { + let db; + let t = async_test('IDBCursor.direction - ' + dir); + let expected = dir ? dir : 'next'; + + let open_rq = createdb(t); + + open_rq.onupgradeneeded = function(e) { + db = e.target.result; + t.add_cleanup(function() { + db.close(); + indexedDB.deleteDatabase(db.name); + }); + + let objStore = db.createObjectStore('test'); + + objStore.add('data', 'key'); + }; + + open_rq.onsuccess = t.step_func(function(e) { + let cursor_rq; + let count = 0; + let os = db.transaction('test', 'readonly').objectStore('test'); + if (dir) + cursor_rq = os.openCursor(undefined, dir); + else + cursor_rq = os.openCursor(); + + cursor_rq.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_equals(cursor.direction, constant, 'direction constant'); + assert_equals(cursor.direction, expected, 'direction'); + assert_readonly(cursor, 'direction'); + + count++; + if (count >= 2) + t.done(); + }); + + let cursor_rq2 = db.transaction('test', 'readonly') + .objectStore('test') + .openCursor(undefined, constant); + + cursor_rq2.onsuccess = t.step_func(function(e) { + let cursor = e.target.result; + + assert_equals( + cursor.direction, constant, 'direction constant (second try)'); + assert_equals(cursor.direction, expected, 'direction (second try)'); + assert_readonly(cursor, 'direction'); + + count++; + if (count >= 2) + t.done(); + }); + }); +} + +cursor_direction('next'); +cursor_direction('next', 'next'); +cursor_direction('prev', 'prev'); +cursor_direction('nextunique', 'nextunique'); +cursor_direction('prevunique', 'prevunique'); diff --git a/tests/wpt/tests/IndexedDB/idbcursor-direction.htm b/tests/wpt/tests/IndexedDB/idbcursor-direction.htm deleted file mode 100644 index 18e3a02ef87..00000000000 --- a/tests/wpt/tests/IndexedDB/idbcursor-direction.htm +++ /dev/null @@ -1,76 +0,0 @@ - -IDBCursor.direction - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js new file mode 100644 index 00000000000..ea9f9593102 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.any.js @@ -0,0 +1,116 @@ +// META: title=IDBFactory.deleteDatabase() +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(t => { + const open_rq = createdb(t, undefined, 9); + + open_rq.onupgradeneeded = t.step_func(e => {}); + open_rq.onsuccess = t.step_func(e => { + const db = e.target.result; + db.close(); + + const delete_rq = indexedDB.deleteDatabase(db.name); + delete_rq.onerror = t.step_func(e => { + assert_unreached('Unexpected delete_rq.error event'); + }); + delete_rq.onsuccess = t.step_func(e => { + assert_equals(e.target.source, null, 'event.target.source'); + t.done(); + }); + }); +}, 'deleteDatabase() request should have no source'); + +async_test(t => { + const open_rq = createdb(t, undefined, 9); + + open_rq.onupgradeneeded = t.step_func(e => {}); + + open_rq.onsuccess = t.step_func(e => { + const db = e.target.result; + db.close(); + + const delete_rq = indexedDB.deleteDatabase(db.name); + delete_rq.onerror = t.step_func(e => { + assert_unreached('Unexpected delete_rq.error event'); + }); + + delete_rq.onsuccess = t.step_func(e => { + assert_equals(e.target.result, undefined, 'result'); + t.done(); + }); + }); +}, 'Result of the deleteDatabase() request is set to undefined.'); + +async_test(t => { + let db; + const open_rq = createdb(t, undefined, 9); + + open_rq.onupgradeneeded = t.step_func(e => { + db = e.target.result; + db.createObjectStore('os'); + }); + + open_rq.onsuccess = t.step_func(e => { + db.close(); + + const delete_rq = indexedDB.deleteDatabase(db.name); + delete_rq.onerror = t.step_func(e => { + assert_unreached('Unexpected delete_rq.error event'); + }); + + delete_rq.onsuccess = t.step_func(e => { + assert_equals(e.oldVersion, 9, 'oldVersion'); + assert_equals(e.newVersion, null, 'newVersion'); + assert_equals(e.target.result, undefined, 'result'); + assert_true( + e instanceof IDBVersionChangeEvent, + 'e instanceof IDBVersionChangeEvent'); + t.done(); + }); + }); +}, 'The deleteDatabase() request\'s success event is an IDBVersionChangeEvent.'); + +async_test(t => { + const dbname = location + '-' + t.name; + + indexedDB.deleteDatabase(dbname); + + let db; + const openrq = indexedDB.open(dbname, 3); + + openrq.onupgradeneeded = t.step_func(e => { + e.target.result.createObjectStore('store'); + }); + + openrq.onsuccess = t.step_func(e => { + db = e.target.result; + + // Errors + db.onversionchange = fail(t, 'db.versionchange'); + db.onerror = fail(t, 'db.error'); + db.abort = fail(t, 'db.abort'); + + step_timeout(t.step_func(() => Second(t, dbname)), 4); + db.close(); + }); + + // Errors + openrq.onerror = fail(t, 'open.error'); + openrq.onblocked = fail(t, 'open.blocked'); +}, 'Delete an existing database - Test events opening a second \ +database when one connection is open already'); + +function Second(t, dbname) { + const deleterq = indexedDB.deleteDatabase(dbname); + + deleterq.onsuccess = e => { + t.done(); + }; + + deleterq.onerror = fail(t, 'delete.error'); + deleterq.onblocked = fail(t, 'delete.blocked'); + deleterq.onupgradeneeded = fail(t, 'delete.upgradeneeded'); +} diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.htm b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.htm deleted file mode 100644 index 28c18cccbb0..00000000000 --- a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase.htm +++ /dev/null @@ -1,25 +0,0 @@ - -IDBFactory.deleteDatabase() - request has no source - - - - - - - -
diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase2.htm b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase2.htm deleted file mode 100644 index e503c3437fb..00000000000 --- a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase2.htm +++ /dev/null @@ -1,27 +0,0 @@ - -IDBFactory.deleteDatabase() - result of the request is set to undefined - - - - - - - - - -
diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase3.htm b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase3.htm deleted file mode 100644 index 2895013f271..00000000000 --- a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase3.htm +++ /dev/null @@ -1,33 +0,0 @@ - -IDBFactory.deleteDatabase() - success event - - - - - - - - - -
diff --git a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase4.htm b/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase4.htm deleted file mode 100644 index 5a0d90bf505..00000000000 --- a/tests/wpt/tests/IndexedDB/idbfactory_deleteDatabase4.htm +++ /dev/null @@ -1,62 +0,0 @@ - -Test events opening a second database when one connection is open already - - - - - -
- - - diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.any.js new file mode 100644 index 00000000000..e1f34cfc7bf --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.any.js @@ -0,0 +1,81 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBObjectStore add()/put() Exception Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-put +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-add + +'use strict'; + +['put', 'add'].forEach(method => { + indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + const store2 = db.createObjectStore('s2'); + + db.deleteObjectStore('s2'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store2[method]('key', 'value'); + }, + '"has been deleted" check (InvalidStateError) should precede ' + + '"not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }, + (t, db) => {}, + `IDBObjectStore.${method} exception order: ` + + 'InvalidStateError vs. TransactionInactiveError'); + + indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + store[method]('key', 'value'); + }, + '"not active" check (TransactionInactiveError) should precede ' + + '"read only" check (ReadOnlyError)'); + t.done(); + }), + 0); + }, + + `IDBObjectStore.${method} exception order: ` + + 'TransactionInactiveError vs. ReadOnlyError'); + + indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + assert_throws_dom( + 'ReadOnlyError', + () => { + store[method]({}, 'value'); + }, + '"read only" check (ReadOnlyError) should precede ' + + 'key/data check (DataError)'); + + t.done(); + }, + + `IDBObjectStore.${method} exception order: ` + + 'ReadOnlyError vs. DataError'); +}); diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.html b/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.html deleted file mode 100644 index e5a73d4b9fa..00000000000 --- a/tests/wpt/tests/IndexedDB/idbobjectstore-add-put-exception-order.html +++ /dev/null @@ -1,74 +0,0 @@ - - -IndexedDB: IDBObjectStore add()/put() Exception Ordering - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.any.js new file mode 100644 index 00000000000..efb8cfa2b43 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.any.js @@ -0,0 +1,56 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBObjectStore clear() Exception Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-clear + +'use strict'; + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + const store2 = db.createObjectStore('s2'); + + db.deleteObjectStore('s2'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store2.clear(); + }, + '"has been deleted" check (InvalidStateError) should precede ' + + '"not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }, + (t, db) => {}, + 'IDBObjectStore.clear exception order: ' + + 'InvalidStateError vs. TransactionInactiveError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + store.clear(); + }, + '"not active" check (TransactionInactiveError) should precede ' + + '"read only" check (ReadOnlyError)'); + t.done(); + }), + 0); + }, + + 'IDBObjectStore.clear exception order: ' + + 'TransactionInactiveError vs. ReadOnlyError'); diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.html b/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.html deleted file mode 100644 index 993704d1d3a..00000000000 --- a/tests/wpt/tests/IndexedDB/idbobjectstore-clear-exception-order.html +++ /dev/null @@ -1,51 +0,0 @@ - - -IndexedDB: IDBObjectStore clear() Exception Ordering - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.any.js new file mode 100644 index 00000000000..dc2baae3f67 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.any.js @@ -0,0 +1,76 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBObjectStore delete() Exception Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-delete + +'use strict'; + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + const store2 = db.createObjectStore('s2'); + + db.deleteObjectStore('s2'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store2.delete('key'); + }, + '"has been deleted" check (InvalidStateError) should precede ' + + '"not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }, + (t, db) => {}, + 'IDBObjectStore.delete exception order: ' + + 'InvalidStateError vs. TransactionInactiveError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + store.delete('key'); + }, + '"not active" check (TransactionInactiveError) should precede ' + + '"read only" check (ReadOnlyError)'); + t.done(); + }), + 0); + }, + 'IDBObjectStore.delete exception order: ' + + 'TransactionInactiveError vs. ReadOnlyError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + assert_throws_dom( + 'ReadOnlyError', + () => { + store.delete({}); + }, + '"read only" check (ReadOnlyError) should precede ' + + 'key/data check (DataError)'); + + t.done(); + }, + 'IDBObjectStore.delete exception order: ' + + 'ReadOnlyError vs. DataError'); diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.html b/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.html deleted file mode 100644 index c33667f4b38..00000000000 --- a/tests/wpt/tests/IndexedDB/idbobjectstore-delete-exception-order.html +++ /dev/null @@ -1,69 +0,0 @@ - - -IndexedDB: IDBObjectStore delete() Exception Ordering - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.any.js new file mode 100644 index 00000000000..1575d4aaae1 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.any.js @@ -0,0 +1,77 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBObjectStore deleteIndex() Exception Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-deleteindex + +'use strict'; + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + store.createIndex('i', 'keyPath'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store.deleteIndex('i'); + }, + '"running an upgrade transaction" check (InvalidStateError) ' + + 'should precede "not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }, + 'IDBObjectStore.deleteIndex exception order: ' + + 'InvalidStateError #1 vs. TransactionInactiveError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + const index = store.createIndex('i', 'keyPath'); + + db.deleteObjectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store.deleteIndex('i'); + }, + '"deleted" check (InvalidStateError) ' + + 'should precede "not active" check (TransactionInactiveError)'); + t.done(); + }), + 0); + }, + (t, db) => {}, + 'IDBObjectStore.deleteIndex exception order: ' + + 'InvalidStateError #2 vs. TransactionInactiveError'); + +indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + store.deleteIndex('nope'); + }, + '"not active" check (TransactionInactiveError) should precede ' + + '"name in store" check (NotFoundError)'); + t.done(); + }), + 0); + }, + (t, db) => {}, + 'IDBObjectStore.deleteIndex exception order: ' + + 'TransactionInactiveError vs. NotFoundError'); diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.html b/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.html deleted file mode 100644 index 9e9bf1e138c..00000000000 --- a/tests/wpt/tests/IndexedDB/idbobjectstore-deleteIndex-exception-order.html +++ /dev/null @@ -1,68 +0,0 @@ - - -IndexedDB: IDBObjectStore deleteIndex() Exception Ordering - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.any.js b/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.any.js new file mode 100644 index 00000000000..f2417ec73da --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.any.js @@ -0,0 +1,64 @@ +// META: global=window,worker +// META: title=IndexedDB: IDBObjectStore query method Ordering +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-get +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getall +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-getallkeys +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-count +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-opencursor +// Spec: https://w3c.github.io/IndexedDB/#dom-idbobjectstore-openkeycursor + +'use strict'; + +['get', 'getAll', 'getAllKeys', 'count', 'openCursor', 'openKeyCursor'].forEach( + method => { + indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + const store2 = db.createObjectStore('s2'); + + db.deleteObjectStore('s2'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'InvalidStateError', + () => { + store2[method]('key'); + }, + '"has been deleted" check (InvalidStateError) should precede ' + + '"not active" check (TransactionInactiveError)'); + + t.done(); + }), + 0); + }, + (t, db) => {}, + `IDBObjectStore.${method} exception order: ` + + 'InvalidStateError vs. TransactionInactiveError'); + + indexeddb_test( + (t, db) => { + const store = db.createObjectStore('s'); + }, + (t, db) => { + const tx = db.transaction('s', 'readonly'); + const store = tx.objectStore('s'); + + setTimeout( + t.step_func(() => { + assert_throws_dom( + 'TransactionInactiveError', + () => { + store[method]({}); + }, + '"not active" check (TransactionInactiveError) should precede ' + + 'query check (DataError)'); + t.done(); + }), + 0); + }, + `IDBObjectStore.${method} exception order: ` + + 'TransactionInactiveError vs. DataError'); + }); diff --git a/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.html b/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.html deleted file mode 100644 index b28572619ef..00000000000 --- a/tests/wpt/tests/IndexedDB/idbobjectstore-query-exception-order.html +++ /dev/null @@ -1,65 +0,0 @@ - - -IndexedDB: IDBObjectStore query method Ordering - - - - - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.htm b/tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.any.js similarity index 68% rename from tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.htm rename to tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.any.js index 73f22697f6e..1ceb784762d 100644 --- a/tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.htm +++ b/tests/wpt/tests/IndexedDB/idbrequest-onupgradeneeded.any.js @@ -1,24 +1,21 @@ - - -IndexedDB: UpgradeNeeded Tests - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbrequest_error.any.js b/tests/wpt/tests/IndexedDB/idbrequest_error.any.js new file mode 100644 index 00000000000..2614db60fb2 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbrequest_error.any.js @@ -0,0 +1,24 @@ +// META: title=IDBRequest.error +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(t => { + let open = createdb(t); + open.onupgradeneeded = t.step_func(e => { + let db = e.target.result; + db.createObjectStore('store'); + }); + open.onsuccess = t.step_func(e => { + let db = e.target.result; + let request = + db.transaction('store', 'readonly').objectStore('store').get(0); + + assert_equals(request.readyState, 'pending'); + assert_throws_dom( + 'InvalidStateError', () => request.error, + 'IDBRequest.error should throw if request is pending'); + t.done(); + }); +}, 'IDBRequest.error throws if ready state is pending'); diff --git a/tests/wpt/tests/IndexedDB/idbrequest_error.html b/tests/wpt/tests/IndexedDB/idbrequest_error.html deleted file mode 100644 index 56d2ddb0083..00000000000 --- a/tests/wpt/tests/IndexedDB/idbrequest_error.html +++ /dev/null @@ -1,25 +0,0 @@ - - -IDBRequest.error - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbrequest_result.any.js b/tests/wpt/tests/IndexedDB/idbrequest_result.any.js new file mode 100644 index 00000000000..035dd54d563 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbrequest_result.any.js @@ -0,0 +1,24 @@ +// META: title=IDBRequest.result +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(t => { + let open = createdb(t); + open.onupgradeneeded = t.step_func(e => { + let db = e.target.result; + db.createObjectStore('store'); + }); + open.onsuccess = t.step_func(e => { + let db = e.target.result; + let request = + db.transaction('store', 'readonly').objectStore('store').get(0); + + assert_equals(request.readyState, 'pending'); + assert_throws_dom( + 'InvalidStateError', () => request.result, + 'IDBRequest.result should throw if request is pending'); + t.done(); + }); +}, 'IDBRequest.result throws if ready state is pending'); diff --git a/tests/wpt/tests/IndexedDB/idbrequest_result.html b/tests/wpt/tests/IndexedDB/idbrequest_result.html deleted file mode 100644 index 6ec81cc29b8..00000000000 --- a/tests/wpt/tests/IndexedDB/idbrequest_result.html +++ /dev/null @@ -1,25 +0,0 @@ - - -IDBRequest.result - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.any.js b/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.any.js new file mode 100644 index 00000000000..52deb19da50 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.any.js @@ -0,0 +1,21 @@ +// META: title=IndexedDB: Verify [SameObject] behavior of IDBTransaction's db attribute +// META: global=window,worker +// META: script=resources/support.js + +// Spec: https://w3c.github.io/IndexedDB/#dom-idbtransaction-db + +'use strict'; + +indexeddb_test( + (t, db, tx) => { + const store = db.createObjectStore('store'); + assert_equals( + tx.db, tx.db, 'Attribute should yield the same object each time'); + }, + (t, db) => { + const tx = db.transaction('store', 'readonly'); + assert_equals( + tx.db, tx.db, 'Attribute should yield the same object each time'); + t.done(); + }, + 'IDBTransaction.db [SameObject]'); diff --git a/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.html b/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.html deleted file mode 100644 index 52e0b0f6e60..00000000000 --- a/tests/wpt/tests/IndexedDB/idbtransaction-db-SameObject.html +++ /dev/null @@ -1,24 +0,0 @@ - - -IndexedDB: Verify [SameObject] behavior of IDBTransaction's db attribute - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.any.js b/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.any.js new file mode 100644 index 00000000000..001267df969 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.any.js @@ -0,0 +1,44 @@ +// META: title=IDBTransaction - complete event +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(t => { + let db; + let store; + let open_rq = createdb(t); + let stages = []; + + open_rq.onupgradeneeded = function(e) { + stages.push('upgradeneeded'); + + db = e.target.result; + store = db.createObjectStore('store'); + + e.target.transaction.oncomplete = function() { + stages.push('complete'); + }; + }; + + open_rq.onsuccess = function(e) { + stages.push('success'); + + let tx = db.transaction('store', 'readonly'); + store = tx.objectStore('store'); + store.openCursor().onsuccess = + function(e) { + stages.push('opencursor'); + } + + db.transaction('store', 'readonly') + .objectStore('store') + .count() + .onsuccess = t.step_func(function(e) { + assert_array_equals(stages, [ + 'upgradeneeded', 'complete', 'success', 'opencursor' + ]); + t.done(); + }); + } +}); diff --git a/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.htm b/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.htm deleted file mode 100644 index 3ee4ee51ac1..00000000000 --- a/tests/wpt/tests/IndexedDB/idbtransaction-oncomplete.htm +++ /dev/null @@ -1,53 +0,0 @@ - -IDBTransaction - complete event - - - - - - - -
diff --git a/tests/wpt/tests/IndexedDB/idbtransaction.any.js b/tests/wpt/tests/IndexedDB/idbtransaction.any.js new file mode 100644 index 00000000000..8dfac5b6c06 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbtransaction.any.js @@ -0,0 +1,65 @@ +// META: title=IDBTransaction +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(function(t) { + let dbname = 'idbtransaction-' + location + t.name; + indexedDB.deleteDatabase(dbname); + let open_rq = indexedDB.open(dbname); + + open_rq.onblocked = t.unreached_func('open_rq.onblocked'); + open_rq.onerror = t.unreached_func('open_rq.onerror'); + + open_rq.onupgradeneeded = t.step_func(function(e) { + t.add_cleanup(function() { + open_rq.onerror = function(e) { + e.preventDefault(); + }; + open_rq.result.close(); + indexedDB.deleteDatabase(open_rq.result.name); + }); + + assert_equals( + e.target, open_rq, 'e.target is reusing the same IDBOpenDBRequest'); + assert_equals( + e.target.transaction, open_rq.transaction, + 'IDBOpenDBRequest.transaction'); + + assert_true( + e.target.transaction instanceof IDBTransaction, + 'transaction instanceof IDBTransaction'); + t.done(); + }); +}, 'IDBTransaction - request gotten by the handler'); + +async_test(function(t) { + let dbname = 'idbtransaction-' + location + t.name; + indexedDB.deleteDatabase(dbname); + let open_rq = indexedDB.open(dbname); + + assert_equals(open_rq.transaction, null, 'IDBOpenDBRequest.transaction'); + assert_equals(open_rq.source, null, 'IDBOpenDBRequest.source'); + assert_equals(open_rq.readyState, 'pending', 'IDBOpenDBRequest.readyState'); + + assert_true( + open_rq instanceof IDBOpenDBRequest, + 'open_rq instanceof IDBOpenDBRequest'); + assert_equals( + open_rq + '', '[object IDBOpenDBRequest]', 'IDBOpenDBRequest (open_rq)'); + + open_rq.onblocked = t.unreached_func('open_rq.onblocked'); + open_rq.onerror = t.unreached_func('open_rq.onerror'); + + open_rq.onupgradeneeded = t.step_func(function() { + t.add_cleanup(function() { + open_rq.onerror = function(e) { + e.preventDefault(); + }; + open_rq.result.close(); + indexedDB.deleteDatabase(open_rq.result.name); + }); + t.done(); + }); +}, 'IDBTransaction - request returned by open()'); diff --git a/tests/wpt/tests/IndexedDB/idbtransaction.htm b/tests/wpt/tests/IndexedDB/idbtransaction.htm deleted file mode 100644 index d08e170eb6e..00000000000 --- a/tests/wpt/tests/IndexedDB/idbtransaction.htm +++ /dev/null @@ -1,63 +0,0 @@ - -IDBTransaction - - - - - - diff --git a/tests/wpt/tests/IndexedDB/idbtransaction_abort.any.js b/tests/wpt/tests/IndexedDB/idbtransaction_abort.any.js new file mode 100644 index 00000000000..7bc27dc3d69 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbtransaction_abort.any.js @@ -0,0 +1,37 @@ +// META: title=IDBTransaction - abort +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +async_test(t => { + let db; + let aborted; + const record = {indexedProperty: 'bar'}; + + let open_rq = createdb(t); + open_rq.onupgradeneeded = function(e) { + db = e.target.result; + let txn = e.target.transaction; + let objStore = db.createObjectStore('store'); + + objStore.add(record, 1); + objStore.add(record, 2); + let index = + objStore.createIndex('index', 'indexedProperty', {unique: true}); + + assert_true(index instanceof IDBIndex, 'IDBIndex'); + + e.target.transaction.onabort = t.step_func(function(e) { + aborted = true; + assert_equals(e.type, 'abort', 'event type'); + }); + + db.onabort = function(e) { + assert_true(aborted, 'transaction.abort event has fired'); + t.done(); + }; + + e.target.transaction.oncomplete = fail(t, 'got complete, expected abort'); + }; +}); diff --git a/tests/wpt/tests/IndexedDB/idbtransaction_abort.htm b/tests/wpt/tests/IndexedDB/idbtransaction_abort.htm deleted file mode 100644 index 3c64352b08d..00000000000 --- a/tests/wpt/tests/IndexedDB/idbtransaction_abort.htm +++ /dev/null @@ -1,41 +0,0 @@ - - -IDBTransaction - abort - - - - - - - -
diff --git a/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.any.js b/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.any.js new file mode 100644 index 00000000000..23be81823a8 --- /dev/null +++ b/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.any.js @@ -0,0 +1,192 @@ +// META: title=IndexedDB: IDBTransaction.objectStoreNames attribute +// META: global=window,worker +// META: script=resources/support.js + +'use strict'; + +function with_stores_test(store_names, open_func, description) { + indexeddb_test(function(t, db, tx) { + store_names.forEach(function(name) { + db.createObjectStore(name); + }); + }, open_func, description); +} + +indexeddb_test( + function(t, db, tx) { + assert_array_equals( + tx.objectStoreNames, [], + 'transaction objectStoreNames should be empty'); + assert_array_equals( + db.objectStoreNames, tx.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + db.createObjectStore('s1'); + assert_array_equals( + tx.objectStoreNames, ['s1'], + 'transaction objectStoreNames should have new store'); + assert_array_equals( + db.objectStoreNames, tx.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + db.createObjectStore('s3'); + assert_array_equals( + tx.objectStoreNames, ['s1', 's3'], + 'transaction objectStoreNames should have new store'); + assert_array_equals( + db.objectStoreNames, tx.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + db.createObjectStore('s2'); + assert_array_equals( + tx.objectStoreNames, ['s1', 's2', 's3'], + 'transaction objectStoreNames should be sorted'); + assert_array_equals( + db.objectStoreNames, tx.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + db.deleteObjectStore('s1'); + assert_array_equals( + tx.objectStoreNames, ['s2', 's3'], + 'transaction objectStoreNames should be updated after delete'); + assert_array_equals( + db.objectStoreNames, tx.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + }, + function(t, db) { + t.done(); + }, + 'IDBTransaction.objectStoreNames - during upgrade transaction'); + +(function() { +let saved_tx; +indexeddb_test( + function(t, db, tx) { + saved_tx = tx; + db.createObjectStore('s2'); + db.createObjectStore('s3'); + }, + function(t, db) { + db.close(); + let open2 = indexedDB.open(db.name, db.version + 1); + open2.onerror = t.unreached_func('open should succeed'); + open2.onupgradeneeded = t.step_func(function() { + let db2 = open2.result; + let tx2 = open2.transaction; + assert_array_equals( + tx2.objectStoreNames, ['s2', 's3'], + 'transaction should have previous stores in scope'); + assert_array_equals( + db2.objectStoreNames, tx2.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + db2.createObjectStore('s4'); + assert_array_equals( + tx2.objectStoreNames, ['s2', 's3', 's4'], + 'transaction should have new store in scope'); + assert_array_equals( + db2.objectStoreNames, tx2.objectStoreNames, + 'connection and transacton objectStoreNames should match'); + + assert_array_equals( + saved_tx.objectStoreNames, ['s2', 's3'], + 'previous transaction objectStoreNames should be unchanged'); + assert_array_equals( + db.objectStoreNames, saved_tx.objectStoreNames, + 'connection and transaction objectStoreNames should match'); + db2.close(); + t.done(); + }); + }, + 'IDBTransaction.objectStoreNames - value after close'); +}()); + +with_stores_test(['s1', 's2'], function(t, db) { + assert_array_equals( + db.transaction('s1', 'readonly').objectStoreNames, ['s1'], + 'transaction should have one store in scope'); + assert_array_equals( + db.transaction(['s1', 's2']).objectStoreNames, ['s1', 's2'], + 'transaction should have two stores in scope'); + t.done(); +}, 'IDBTransaction.objectStoreNames - transaction scope'); + +with_stores_test(['s1', 's2'], function(t, db) { + let tx = db.transaction(['s1', 's2'], 'readwrite'); + tx.objectStore('s1').put(0, 0); + tx.onabort = t.unreached_func('transaction should complete'); + tx.oncomplete = t.step_func(function() { + assert_array_equals( + tx.objectStoreNames, ['s1', 's2'], + 'objectStoreNames should return scope after transaction commits'); + t.done(); + }); +}, 'IDBTransaction.objectStoreNames - value after commit'); + +with_stores_test(['s1', 's2'], function(t, db) { + let tx = db.transaction(['s1', 's2'], 'readwrite'); + tx.objectStore('s1').put(0, 0); + tx.objectStore('s1').add(0, 0); + tx.oncomplete = t.unreached_func('transaction should abort'); + tx.onabort = t.step_func(function() { + assert_array_equals( + tx.objectStoreNames, ['s1', 's2'], + 'objectStoreNames should return scope after transaction aborts'); + t.done(); + }); +}, 'IDBTransaction.objectStoreNames - value after abort'); + +with_stores_test(['s1', 's2', 's3'], function(t, db) { + assert_array_equals( + db.transaction(['s3', 's2', 's1']).objectStoreNames, ['s1', 's2', 's3'], + 'transaction objectStoreNames should be sorted'); + t.done(); +}, 'IDBTransaction.objectStoreNames - sorting'); + +with_stores_test(['s1', 's2'], function(t, db) { + assert_array_equals( + db.transaction(['s2', 's1', 's2']).objectStoreNames, ['s1', 's2'], + 'transaction objectStoreNames should not have duplicates'); + t.done(); +}, 'IDBTransaction.objectStoreNames - no duplicates'); + +let unusual_names = [ + '', // empty string + + '\x00', // U+0000 NULL + '\xFF', // U+00FF LATIN SMALL LETTER Y WITH DIAERESIS + + '1', // basic ASCII + '12', // basic ASCII + '123', // basic ASCII + 'abc', // basic ASCII + 'ABC', // basic ASCII + + '\xA2', // U+00A2 CENT SIGN + '\u6C34', // U+6C34 CJK UNIFIED IDEOGRAPH (water) + '\uD834\uDD1E', // U+1D11E MUSICAL SYMBOL G-CLEF (UTF-16 surrogate pair) + '\uFFFD', // U+FFFD REPLACEMENT CHARACTER + + '\uD800', // UTF-16 surrogate lead + '\uDC00', // UTF-16 surrogate trail +]; +unusual_names.sort(); + +indexeddb_test( + function(t, db, tx) { + unusual_names.slice().reverse().forEach(function(name) { + db.createObjectStore(name); + }); + assert_array_equals( + tx.objectStoreNames, unusual_names, + 'transaction should have names sorted'); + }, + function(t, db) { + let tx = + db.transaction(unusual_names.slice().reverse().concat(unusual_names)); + assert_array_equals( + tx.objectStoreNames, unusual_names, + 'transaction should have names sorted with no duplicates'); + t.done(); + }, + 'IDBTransaction.objectStoreNames - unusual names'); diff --git a/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.html b/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.html deleted file mode 100644 index e9b725e0395..00000000000 --- a/tests/wpt/tests/IndexedDB/idbtransaction_objectStoreNames.html +++ /dev/null @@ -1,165 +0,0 @@ - -IndexedDB: IDBTransaction.objectStoreNames attribute - - - - diff --git a/tests/wpt/tests/accname/name/comp_labelledby.html b/tests/wpt/tests/accname/name/comp_labelledby.html index 2a22fd89191..26c2f5e5005 100644 --- a/tests/wpt/tests/accname/name/comp_labelledby.html +++ b/tests/wpt/tests/accname/name/comp_labelledby.html @@ -21,6 +21,7 @@ - /accname/name/shadowdom/* --> +

Tests for aria-labelledby

first heading

@@ -36,6 +37,42 @@ verifyspacesFAIL IF INCLUDEDbetweenforeach + + + +

Tests for aria-labeledby (non-standard spelling)

+ +first label +second label + +

Tests for precedence: aria-labelledby vs. aria-labeledby (non-standard spelling)

+ + +
x + +
x
+ +x + +
x
+ +

Tests for name precedence with aria-labeledby (non-standard spelling)

+ + + +

+ + link1 + + + link2 + image + + + link3 + +

+ + + + + + + +
+ diff --git a/tests/wpt/tests/css/css-backgrounds/background-image-table-cells-straddling-no-repeat.html b/tests/wpt/tests/css/css-backgrounds/background-image-table-cells-straddling-no-repeat.html index 67f7937a3fc..022e6462089 100644 --- a/tests/wpt/tests/css/css-backgrounds/background-image-table-cells-straddling-no-repeat.html +++ b/tests/wpt/tests/css/css-backgrounds/background-image-table-cells-straddling-no-repeat.html @@ -3,6 +3,7 @@ + + + + `lang="en"` should render ligatures, `lang="tr"` not. +
fi
+ + diff --git a/tests/wpt/tests/css/css-fonts/lang-attribute-affects-rendering.html b/tests/wpt/tests/css/css-fonts/lang-attribute-affects-rendering.html new file mode 100644 index 00000000000..041fd8f5abd --- /dev/null +++ b/tests/wpt/tests/css/css-fonts/lang-attribute-affects-rendering.html @@ -0,0 +1,24 @@ + + + + + + + + + + `lang="en"` should render ligatures, `lang="tr"` not. +
fi
+ + diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-001.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-001.html new file mode 100644 index 00000000000..2741196e522 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-001.html @@ -0,0 +1,34 @@ + + + CSS Gap Decorations: column and row gaps are painted. + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002-ref.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002-ref.html new file mode 100644 index 00000000000..f21be425243 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002-ref.html @@ -0,0 +1,38 @@ + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002.html new file mode 100644 index 00000000000..8cad606c6ac --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-002.html @@ -0,0 +1,34 @@ + + + CSS Gap Decorations: grid column gaps are painted with solid styling. + + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003-ref.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003-ref.html new file mode 100644 index 00000000000..86796edba42 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003-ref.html @@ -0,0 +1,38 @@ + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003.html new file mode 100644 index 00000000000..5e618aae79b --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-003.html @@ -0,0 +1,34 @@ + + + CSS Gap Decorations: grid column gaps are painted with dotted styling. + + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004-ref.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004-ref.html new file mode 100644 index 00000000000..9011957ea4d --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004-ref.html @@ -0,0 +1,38 @@ + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004.html new file mode 100644 index 00000000000..ab7e5d6695c --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-004.html @@ -0,0 +1,35 @@ + + + CSS Gap Decorations: grid column gaps are painted with double styling. + + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005-ref.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005-ref.html new file mode 100644 index 00000000000..887c9f18f12 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005-ref.html @@ -0,0 +1,38 @@ + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005.html b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005.html new file mode 100644 index 00000000000..8a429eea355 --- /dev/null +++ b/tests/wpt/tests/css/css-gaps/tentative/grid/grid-gap-decorations-005.html @@ -0,0 +1,35 @@ + + + CSS Gap Decorations: grid column gaps are painted with double styling and specifed width. + + + + + +
+
+
+
+
+
diff --git a/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces-ref.html b/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces-ref.html new file mode 100644 index 00000000000..6ead48c4a0d --- /dev/null +++ b/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces-ref.html @@ -0,0 +1,34 @@ + + + + Gradient interpolation + + + + + + + diff --git a/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces.html b/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces.html new file mode 100644 index 00000000000..c6a88d7af5a --- /dev/null +++ b/tests/wpt/tests/css/css-images/gradient/gradient-eval-predefined-color-spaces.html @@ -0,0 +1,38 @@ + + + + Gradient interpolation in all predefined color spaces + + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-images/gradient/gradient-single-stop-001.html b/tests/wpt/tests/css/css-images/gradient/gradient-single-stop-001.html index 5292f1909e7..af43fd7e9fc 100644 --- a/tests/wpt/tests/css/css-images/gradient/gradient-single-stop-001.html +++ b/tests/wpt/tests/css/css-images/gradient/gradient-single-stop-001.html @@ -8,6 +8,7 @@ + +
+ +
  • unspecified
  • +
  • outside
  • +
  • initial
  • +
  • inherit
  • +
  • unset
  • +
  • revert
  • +
  • revert-layer
  • +
    diff --git a/tests/wpt/tests/css/css-lists/list-style-position-001-ref.html b/tests/wpt/tests/css/css-lists/list-style-position-001-ref.html new file mode 100644 index 00000000000..ef2a03da18d --- /dev/null +++ b/tests/wpt/tests/css/css-lists/list-style-position-001-ref.html @@ -0,0 +1,33 @@ + + +CSS Reference Case + + +
    + + +
    diff --git a/tests/wpt/tests/css/css-lists/list-style-position-001.html b/tests/wpt/tests/css/css-lists/list-style-position-001.html new file mode 100644 index 00000000000..361ca994f76 --- /dev/null +++ b/tests/wpt/tests/css/css-lists/list-style-position-001.html @@ -0,0 +1,29 @@ + + +CSS Test: 'list-style-position:outside' should be the initial value and should result in 'outside' marker-positioning + + + + + +
    + +
  • unspecified
  • +
  • outside
  • +
  • initial
  • +
  • inherit
  • +
  • unset
  • +
  • revert
  • +
  • revert-layer
  • +
    diff --git a/tests/wpt/tests/css/css-mixins/at-function-cssom.tentative.html b/tests/wpt/tests/css/css-mixins/at-function-cssom.tentative.html new file mode 100644 index 00000000000..c8c3ee475bf --- /dev/null +++ b/tests/wpt/tests/css/css-mixins/at-function-cssom.tentative.html @@ -0,0 +1,301 @@ + +CSS Custom Functions: CSSOM + + + + + diff --git a/tests/wpt/tests/css/css-mixins/dashed-function-eval.html b/tests/wpt/tests/css/css-mixins/dashed-function-eval.html index eb706ee3c99..8213201eff8 100644 --- a/tests/wpt/tests/css/css-mixins/dashed-function-eval.html +++ b/tests/wpt/tests/css/css-mixins/dashed-function-eval.html @@ -3,6 +3,7 @@ +
    @@ -480,17 +481,6 @@ - diff --git a/tests/wpt/tests/css/css-mixins/local-var-substitution.html b/tests/wpt/tests/css/css-mixins/local-var-substitution.html new file mode 100644 index 00000000000..2c22cc60565 --- /dev/null +++ b/tests/wpt/tests/css/css-mixins/local-var-substitution.html @@ -0,0 +1,73 @@ + +Custom Functions: Local var() substitution + + + + + +
    +
    + + + + + + + + + + + + + + diff --git a/tests/wpt/tests/css/css-mixins/resources/utils.js b/tests/wpt/tests/css/css-mixins/resources/utils.js new file mode 100644 index 00000000000..0e196b72573 --- /dev/null +++ b/tests/wpt/tests/css/css-mixins/resources/utils.js @@ -0,0 +1,31 @@ +// Looks for