diff --git a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini similarity index 67% rename from tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini rename to tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini index f29da48a2a0..4bfb0c2053a 100644 --- a/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-003.html.ini +++ b/tests/wpt/metadata-layout-2020/css/CSS2/floats/hit-test-floats-004.html.ini @@ -1,4 +1,4 @@ -[hit-test-floats-003.html] +[hit-test-floats-004.html] [Miss float below something else] expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/columns-height-set-via-top-bottom.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/columns-height-set-via-top-bottom.html.ini new file mode 100644 index 00000000000..225caf3afdb --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/columns-height-set-via-top-bottom.html.ini @@ -0,0 +1,7 @@ +[columns-height-set-via-top-bottom.html] + [.flexbox 1] + expected: FAIL + + [.flexbox 2] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/content-height-with-scrollbars.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/content-height-with-scrollbars.html.ini new file mode 100644 index 00000000000..93646b64db6 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/content-height-with-scrollbars.html.ini @@ -0,0 +1,2 @@ +[content-height-with-scrollbars.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-factor-less-than-one.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-factor-less-than-one.html.ini new file mode 100644 index 00000000000..843d495cdc9 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/flex-factor-less-than-one.html.ini @@ -0,0 +1,49 @@ +[flex-factor-less-than-one.html] + [.flexbox 4] + expected: FAIL + + [.flexbox 5] + expected: FAIL + + [.flexbox 7] + expected: FAIL + + [.flexbox 3] + expected: FAIL + + [.flexbox 8] + expected: FAIL + + [.flexbox 9] + expected: FAIL + + [.flexbox 16] + expected: FAIL + + [.flexbox 17] + expected: FAIL + + [.flexbox 14] + expected: FAIL + + [.flexbox 12] + expected: FAIL + + [.flexbox 13] + expected: FAIL + + [.flexbox 18] + expected: FAIL + + [.flexbox 19] + expected: FAIL + + [.flexbox 22] + expected: FAIL + + [.flexbox 21] + expected: FAIL + + [.flexbox 20] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/floated-flexitem.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/floated-flexitem.html.ini new file mode 100644 index 00000000000..8702b807c4b --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/floated-flexitem.html.ini @@ -0,0 +1,2 @@ +[floated-flexitem.html] + expected: FAIL diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/inline-flexbox-wrap-vertically-width-calculation.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/inline-flexbox-wrap-vertically-width-calculation.html.ini new file mode 100644 index 00000000000..ef4599e75d8 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/inline-flexbox-wrap-vertically-width-calculation.html.ini @@ -0,0 +1,43 @@ +[inline-flexbox-wrap-vertically-width-calculation.html] + [.inline-flexbox 13] + expected: FAIL + + [.inline-flexbox 12] + expected: FAIL + + [.inline-flexbox 11] + expected: FAIL + + [.inline-flexbox 10] + expected: FAIL + + [.inline-flexbox 16] + expected: FAIL + + [.inline-flexbox 15] + expected: FAIL + + [.inline-flexbox 14] + expected: FAIL + + [.inline-flexbox 3] + expected: FAIL + + [.inline-flexbox 2] + expected: FAIL + + [.inline-flexbox 7] + expected: FAIL + + [.inline-flexbox 6] + expected: FAIL + + [.inline-flexbox 5] + expected: FAIL + + [.inline-flexbox 4] + expected: FAIL + + [.inline-flexbox 8] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/font-face-range-order.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/font-face-range-order.html.ini new file mode 100644 index 00000000000..3588cc80111 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/font-face-range-order.html.ini @@ -0,0 +1,4 @@ +[font-face-range-order.html] + [CSS Fonts Module Level 3: Order of values in @font-face range descriptors] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/css/css-fonts/matching/range-descriptor-reversed.html.ini b/tests/wpt/metadata-layout-2020/css/css-fonts/matching/range-descriptor-reversed.html.ini new file mode 100644 index 00000000000..a341dd66fb4 --- /dev/null +++ b/tests/wpt/metadata-layout-2020/css/css-fonts/matching/range-descriptor-reversed.html.ini @@ -0,0 +1,2 @@ +[range-descriptor-reversed.html] + expected: TIMEOUT diff --git a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini index f8e7e539aae..4a1e8110f6f 100644 --- a/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini +++ b/tests/wpt/metadata-layout-2020/css/css-transforms/transform-scale-hittest.html.ini @@ -2,6 +2,3 @@ [Hit test intersecting scaled box] expected: FAIL - [Hit test within unscaled box] - expected: FAIL - diff --git a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini index c131078eace..23c61ede1a1 100644 --- a/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini +++ b/tests/wpt/metadata-layout-2020/css/cssom-view/elementFromPosition.html.ini @@ -17,3 +17,6 @@ [test the top of layer] expected: FAIL + [test some point of the element: top left corner] + expected: FAIL + diff --git a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini index b794351d8c1..695bb67c86b 100644 --- a/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini +++ b/tests/wpt/metadata-layout-2020/fetch/content-type/response.window.js.ini @@ -318,12 +318,6 @@ [ + + diff --git a/tests/wpt/web-platform-tests/interfaces/wake-lock.idl b/tests/wpt/web-platform-tests/interfaces/wake-lock.idl index 85d1863fa6f..429b80e0668 100644 --- a/tests/wpt/web-platform-tests/interfaces/wake-lock.idl +++ b/tests/wpt/web-platform-tests/interfaces/wake-lock.idl @@ -1,32 +1,23 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into reffy-reports // (https://github.com/tidoust/reffy-reports) -// Source: Wake Lock API (https://w3c.github.io/wake-lock/) - -dictionary WakeLockPermissionDescriptor : PermissionDescriptor { - required WakeLockType type; -}; - -enum WakeLockType { "screen", "system" }; +// Source: Screen Wake Lock API (https://w3c.github.io/wake-lock/) [SecureContext] partial interface Navigator { [SameObject] readonly attribute WakeLock wakeLock; }; -[SecureContext] -partial interface WorkerNavigator { - [SameObject] readonly attribute WakeLock wakeLock; -}; - -[SecureContext, Exposed=(DedicatedWorker, Window)] +[SecureContext, Exposed=(Window)] interface WakeLock { Promise request(WakeLockType type); }; -[SecureContext, Exposed=(DedicatedWorker, Window)] +[SecureContext, Exposed=(Window)] interface WakeLockSentinel : EventTarget { readonly attribute WakeLockType type; Promise release(); attribute EventHandler onrelease; }; + +enum WakeLockType { "screen" }; diff --git a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl index 514d09f15a6..aaadda29b8a 100644 --- a/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl +++ b/tests/wpt/web-platform-tests/interfaces/webrtc-stats.idl @@ -330,6 +330,9 @@ dictionary RTCIceCandidatePairStats : RTCStats { DOMHighResTimeStamp consentExpiredTimestamp; unsigned long packetsDiscardedOnSend; unsigned long long bytesDiscardedOnSend; + unsigned long long requestBytesSent; + unsigned long long consentRequestBytesSent; + unsigned long long responseBytesSent; }; enum RTCStatsIceCandidatePairState { diff --git a/tests/wpt/web-platform-tests/native-io/META.yml b/tests/wpt/web-platform-tests/native-io/META.yml new file mode 100644 index 00000000000..22a45c20c9b --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/META.yml @@ -0,0 +1,4 @@ +spec: https://todo.github.io/native-io/ +suggested_reviewers: + - pwnall + - mikewest diff --git a/tests/wpt/web-platform-tests/native-io/README.md b/tests/wpt/web-platform-tests/native-io/README.md new file mode 100644 index 00000000000..eb1a8d268ce --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/README.md @@ -0,0 +1,16 @@ +This directory contains tests for the +[NativeIO API](https://github.com/TODO/native-io). + +## Note on the synchronous APIs + +Chrome is currently working with developers to explore the performance +implications of using NativeIO as an asynchronous Promise-based API from +WebAssembly. + +In order to assess the performance overhead, a baseline is needed. This baseline +is a synchronous API that can be easily used to port existing database code to +WebAssembly. The synchronous API is only exposed to dedicated workers. + +Until our performance studies are concluded, Chrome has no plans of shipping the +synchronous API. In other words, there are no plans of adding a new synchronous +storage API to the Web Platform. diff --git a/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js new file mode 100644 index 00000000000..a2337e50dbc --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/close_async.tentative.https.any.js @@ -0,0 +1,82 @@ +// META: title=NativeIO API: close(). +// META: global=window,worker + +'use strict'; + +// Returns a handle to a newly created file that holds some data. +// +// The file will be closed and deleted when the test ends. +async function createFile(testCase, fileName) { + const file = await nativeIO.open(fileName); + testCase.add_cleanup(async () => { + await file.close(); + await nativeIO.delete('test_file'); + }); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([64, 65, 66, 67]); + const writeCount = await file.write(writtenBytes, 0); + assert_precondition(writeCount == 4); + + return file; +} + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + assert_equals(await file.close(), undefined); + + assert_equals(await file.close(), undefined); +}, 'NativeIOFile.close is idempotent'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + const closePromise = file.close(); + + assert_equals(await file.close(), undefined); + assert_equals(await closePromise, undefined); +}, 'NativeIOFile.close is idempotent when called immediately'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + assert_equals(await file.close(), undefined); + + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.read(readBytes, 4)); +}, 'NativeIOFile.read fails after NativeIOFile.close settles'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + const closePromise = file.close(); + + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.read(readBytes, 4)); + assert_equals(await closePromise, undefined); +}, 'NativeIOFile.read fails immediately after calling NativeIOFile.close'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + assert_equals(await file.close(), undefined); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([96, 97, 98, 99]); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.write(writtenBytes, 4)); +}, 'NativeIOFile.write fails after NativeIOFile.close settles'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + const closePromise = file.close(); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([96, 97, 98, 99]); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.write(writtenBytes, 4)); + assert_equals(await closePromise, undefined); +}, 'NativeIOFile.write fails immediately after calling NativeIOFile.close'); diff --git a/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js new file mode 100644 index 00000000000..001fa57a2c0 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/close_sync.tentative.https.any.js @@ -0,0 +1,44 @@ +// META: title=Synchronous NativeIO API: close(). +// META: global=!default,dedicatedworker + +'use strict'; + +// Returns a handle to a newly created file that holds some data. +// +// The file will be closed and deleted when the test ends. +function createFileSync(testCase, fileName) { + const file = nativeIO.openSync(fileName); + testCase.add_cleanup(() => { + file.close(); + nativeIO.deleteSync('test_file'); + }); + + const writtenBytes = Uint8Array.from([64, 65, 66, 67]); + const writeCount = file.write(writtenBytes, 0); + assert_precondition(writeCount == 4); + + return file; +} + +test(testCase => { + const file = createFileSync(testCase, 'file_name'); + assert_equals(undefined, file.close()); + + assert_equals(undefined, file.close()); +}, 'nativeIO.close is idempotent'); + +test(testCase => { + const file = createFileSync(testCase, 'file_name'); + assert_equals(undefined, file.close()); + + const readBytes = new Uint8Array(4); + assert_throws_dom('InvalidStateError', () => file.read(readBytes, 4)); +}, 'nativeIO.read fails after nativeIO.close settles'); + +test(testCase => { + const file = createFileSync(testCase, 'file_name'); + assert_equals(undefined, file.close()); + + const writtenBytes = Uint8Array.from([96, 97, 98, 99]); + assert_throws_dom('InvalidStateError', () => file.write(writtenBytes, 4)); +}, 'NativeIOFile.write fails after NativeIOFile.close'); diff --git a/tests/wpt/web-platform-tests/native-io/concurrent_io_async.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/concurrent_io_async.tentative.https.any.js new file mode 100644 index 00000000000..22eea20c312 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/concurrent_io_async.tentative.https.any.js @@ -0,0 +1,105 @@ +// META: title=NativeIO API: close(). +// META: global=window,worker + +'use strict'; + +// Returns a handle to a newly created file that holds some data. +// +// The file will be closed and deleted when the test ends. +async function createFile(testCase, fileName) { + const file = await nativeIO.open(fileName); + testCase.add_cleanup(async () => { + await file.close(); + await nativeIO.delete('test_file'); + }); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([64, 65, 66, 67]); + const writeCount = await file.write(writtenBytes, 0); + assert_precondition(writeCount == 4); + + return file; +} + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + const readSharedArrayBuffer2 = new SharedArrayBuffer(4); + const readBytes2 = new Uint8Array(readSharedArrayBuffer2); + + const readPromise = file.read(readBytes, 0); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.read(readBytes2, 4)); + + assert_equals(await readPromise, 4); + assert_array_equals(readBytes, [64, 65, 66, 67]); + assert_array_equals(readBytes2, [0, 0, 0, 0]); +}, 'read() rejects wrile read() is resolving'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([96, 97, 98, 99]); + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + + const writePromise = file.write(writtenBytes, 0); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.read(readBytes, 4)); + + assert_equals(await writePromise, 4); + assert_array_equals(readBytes, [0, 0, 0, 0]); +}, 'read() rejects wrile write() is resolving'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([96, 97, 98, 99]); + + const readPromise = file.read(readBytes, 0); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.write(writtenBytes, 4)); + + assert_equals(await readPromise, 4); + assert_array_equals(readBytes, [64, 65, 66, 67]); + + readBytes.fill(0); + assert_equals(await file.read(readBytes, 0), 4, + 'NativeIOFile.read() should not fail after a rejected write'); + assert_array_equals(readBytes, [64, 65, 66, 67], + 'The rejected write should not change the file'); +}, 'write() rejects wrile read() is resolving'); + +promise_test(async testCase => { + const file = await createFile(testCase, 'file_name'); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([96, 97, 98, 99]); + + const writeSharedArrayBuffer2 = new SharedArrayBuffer(4); + const writtenBytes2 = new Uint8Array(writeSharedArrayBuffer2); + writtenBytes2.set([48, 49, 50, 51]); + + const writePromise = file.write(writtenBytes, 0); + await promise_rejects_dom(testCase, 'InvalidStateError', + file.write(writtenBytes2, 4)); + + assert_equals(await writePromise, 4); + + const readSharedArrayBuffer = new SharedArrayBuffer(4); + const readBytes = new Uint8Array(readSharedArrayBuffer); + assert_equals(await file.read(readBytes, 0), 4, + 'NativeIOFile.read() should not fail after a rejected write'); + assert_array_equals(readBytes, writtenBytes, + 'The rejected write should not change the file'); +}, 'write() rejects wrile write() is resolving'); diff --git a/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js new file mode 100644 index 00000000000..1229ecf0f3d --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/delete_async_basic.tentative.https.any.js @@ -0,0 +1,20 @@ +// META: title=NativeIO API: File deletion is reflected in listing. +// META: global=window,worker + +'use strict'; + +promise_test(async testCase => { + const file = await nativeIO.open('test_file'); + testCase.add_cleanup(async () => { + await nativeIO.delete('test_file'); + }); + await file.close(); + + const fileNamesBeforeDelete = await nativeIO.getAll(); + assert_in_array('test_file', fileNamesBeforeDelete); + + await nativeIO.delete('test_file'); + const fileNames = await nativeIO.getAll(); + assert_equals(fileNames.indexOf('test_file'), -1); +}, 'nativeIO.getAll does not return file deleted by nativeIO.delete'); + diff --git a/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js new file mode 100644 index 00000000000..c9c600d6b16 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/delete_sync_basic.tentative.https.any.js @@ -0,0 +1,19 @@ +// META: title=Synchronous NativeIO API: File deletion is reflected in listing. +// META: global=!default,dedicatedworker + +'use strict'; + +test(testCase => { + const file = nativeIO.openSync('test_file'); + testCase.add_cleanup(() => { + nativeIO.deleteSync('test_file'); + }); + file.close(); + + const fileNamesBeforeDelete = nativeIO.getAllSync(); + assert_in_array('test_file', fileNamesBeforeDelete); + + nativeIO.deleteSync('test_file'); + const fileNames = nativeIO.getAllSync(); + assert_equals(fileNames.indexOf('test_file'), -1); +}, 'nativeIO.getAllSync does not return file deleted by nativeIO.deleteSync'); diff --git a/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js new file mode 100644 index 00000000000..0487ef5e2f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/open_getAll_async_basic.tentative.https.any.js @@ -0,0 +1,15 @@ +// META: title=NativeIO API: File creation is reflected in listing. +// META: global=window,worker + +'use strict'; + +promise_test(async testCase => { + const file = await nativeIO.open('test_file'); + testCase.add_cleanup(async () => { + await nativeIO.delete('test_file'); + }); + await file.close(); + + const fileNames = await nativeIO.getAll(); + assert_in_array('test_file', fileNames); +}, 'nativeIO.getAll returns file created by nativeIO.open'); diff --git a/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js new file mode 100644 index 00000000000..64fa90182a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/open_getAll_sync_basic.tentative.https.any.js @@ -0,0 +1,15 @@ +// META: title=Synchronous NativeIO API: File creation is reflected in listing. +// META: global=!default,dedicatedworker + +'use strict'; + +test(testCase => { + const file = nativeIO.openSync('test_file'); + testCase.add_cleanup(() => { + nativeIO.deleteSync('test_file'); + }); + file.close(); + + const fileNames = nativeIO.getAllSync(); + assert_in_array('test_file', fileNames); +}, 'nativeIO.getAllSync returns file created by nativeIO.openSync'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js new file mode 100644 index 00000000000..cf2a3f56bc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/read_write_async_basic.tentative.https.any.js @@ -0,0 +1,29 @@ +// META: title=NativeIO API: Written bytes are read back. +// META: global=window,worker + +'use strict'; + +promise_test(async testCase => { + const file = await nativeIO.open('test_file'); + testCase.add_cleanup(async () => { + await file.close(); + await nativeIO.delete('test_file'); + }); + + const writeSharedArrayBuffer = new SharedArrayBuffer(4); + const writtenBytes = new Uint8Array(writeSharedArrayBuffer); + writtenBytes.set([64, 65, 66, 67]); + const writeCount = await file.write(writtenBytes, 0); + assert_equals( + writeCount, 4, + 'NativeIOFile.write() should resolve with the number of bytes written'); + + const readSharedArrayBuffer = new SharedArrayBuffer(writtenBytes.length); + const readBytes = new Uint8Array(readSharedArrayBuffer); + const readCount = await file.read(readBytes, 0); + assert_equals(readCount, 4, + 'NativeIOFile.read() should return the number of bytes read'); + + assert_array_equals(readBytes, writtenBytes, + 'the bytes read should match the bytes written'); +}, 'NativeIOFile.read returns bytes written by NativeIOFile.write'); diff --git a/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js b/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js new file mode 100644 index 00000000000..f6265aa83f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/native-io/read_write_sync_basic.tentative.https.any.js @@ -0,0 +1,26 @@ +// META: title=Synchronous NativeIO API: Written bytes are read back. +// META: global=!default,dedicatedworker + +'use strict'; + +test(testCase => { + const file = nativeIO.openSync('test_file'); + testCase.add_cleanup(() => { + file.close(); + nativeIO.deleteSync('test_file'); + }); + + const writtenBytes = Uint8Array.from([64, 65, 66, 67]); + const writeCount = file.write(writtenBytes, 0); + assert_equals( + writeCount, 4, + 'NativeIOFile.write() should resolve with the number of bytes written'); + + const readBytes = new Uint8Array(writtenBytes.length); + const readCount = file.read(readBytes, 0); + assert_equals(readCount, 4, + 'NativeIOFile.read() should return the number of bytes read'); + + assert_array_equals(readBytes, writtenBytes, + 'the bytes read should match the bytes written'); +}, 'NativeIOFileSync.read returns bytes written by NativeIOFileSync.write'); diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node_in_shadow_dom.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node_in_shadow_dom.html new file mode 100644 index 00000000000..f92daeb02e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_lostpointercapture_for_disconnected_node_in_shadow_dom.html @@ -0,0 +1,129 @@ + + + + Lostpointercapture fires on document when target in shadow dom is removed + + + + + + + + + + +

Pointer Events - lostpointercapture when capturing element in shadow dom is removed

+

+ Test Description: + This test checks if lostpointercapture is fired at the document when the capturing node that is in shadow dom is removed from the shadow dom. + Complete the following actions: +
    +
  1. Press left mouse button over "Set Capture" button. Pointer should be captured by the gray rectangle which is in shadow dom.
  2. +
  3. Gray rectangle will be removed from shadow dom.
  4. +
  5. "lostpointercapture" should be received on the document not on the gray rectangle.
  6. +
+

+
+
+ +
+ + + diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-custom-element.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-custom-element.html new file mode 100644 index 00000000000..e8f143b309f --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-custom-element.html @@ -0,0 +1,123 @@ + + + + PointerCapture for Custome Shadow DOM + + + + + + + + + + + + +

PointerCapture by Custom Element's Shadow DOM

+ The magenta box below is part of a custom element's Shadow DOM. + + + +
+ + + diff --git a/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-shadow-dom.html b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-shadow-dom.html new file mode 100644 index 00000000000..8279665f97b --- /dev/null +++ b/tests/wpt/web-platform-tests/pointerevents/pointerevent_pointercapture-in-shadow-dom.html @@ -0,0 +1,114 @@ + + + + PointerCapture for Shadow DOM Elements + + + + + + + + + + + +

PointerCapture by Shadow DOM element

+ The light gray box below is part of Shadow DOM. + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/svg/text/scripted/textpath-textlength-text-anchor-001.tentative.svg b/tests/wpt/web-platform-tests/svg/text/scripted/textpath-textlength-text-anchor-001.tentative.svg new file mode 100644 index 00000000000..6c4f50fe871 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/text/scripted/textpath-textlength-text-anchor-001.tentative.svg @@ -0,0 +1,54 @@ + + 'textLength' on <textPath> with 'text-anchor' adjustments + + + + + + + + + + + XXXX + + + XXXX + + + + XXXX + + + XXXX + + + + XXXX + + + XXXX + + + + diff --git a/tests/wpt/web-platform-tests/uievents/click/click_events_on_input.html b/tests/wpt/web-platform-tests/uievents/click/click_events_on_input.html index 731d13934f0..2f380eb4514 100644 --- a/tests/wpt/web-platform-tests/uievents/click/click_events_on_input.html +++ b/tests/wpt/web-platform-tests/uievents/click/click_events_on_input.html @@ -37,10 +37,7 @@ // Inject mouse click events. var actions = new test_driver.Actions(); document.getElementById("other").focus(); - var bounds = target.getBoundingClientRect(); - actions.pointerMove(Math.floor(bounds.width / 5), - Math.floor(bounds.height / 2), - {origin: target}) + actions.pointerMove(0, 0, {origin: target}) .pointerDown({button: mouseButton}) .pointerUp({button: mouseButton}) .send()