diff --git a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini index cd3e2dfa305..76b398963ae 100644 --- a/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini +++ b/tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini @@ -7,7 +7,7 @@ expected: FAIL [Opening a blob URL in a new window immediately before revoking it works.] - expected: TIMEOUT + expected: FAIL [Opening a blob URL in a noopener about:blank window immediately before revoking it works.] expected: FAIL @@ -15,3 +15,6 @@ [Opening a blob URL in a new window by clicking an tag works immediately before revoking the URL.] expected: FAIL + [Fetching a blob URL immediately before revoking it works in + + + diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini index 1d63261c554..358c6f0902e 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPoints.html.ini @@ -1,6 +1,7 @@ [multiTouchPoints.html] expected: if product == "firefox" or product == "safari" or product == "epiphany" or product == "webkit": ERROR + if product == "chrome" and os == "mac": ERROR [TestDriver actions: two touch points with one moving one pause] expected: if product == "chrome" and os != "mac": FAIL diff --git a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPointsWithPause.html.ini b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPointsWithPause.html.ini index 4f1939a431a..83ade1dddf0 100644 --- a/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPointsWithPause.html.ini +++ b/tests/wpt/web-platform-tests/infrastructure/metadata/infrastructure/testdriver/actions/multiTouchPointsWithPause.html.ini @@ -1,3 +1,4 @@ [multiTouchPointsWithPause.html] expected: if product == "firefox" or product == "safari": ERROR + if product == "chrome" and os == "mac": ERROR diff --git a/tests/wpt/web-platform-tests/longtask-timing/buffered-flag-unsupported.window.js b/tests/wpt/web-platform-tests/longtask-timing/buffered-flag-unsupported.window.js deleted file mode 100644 index ea17b824c35..00000000000 --- a/tests/wpt/web-platform-tests/longtask-timing/buffered-flag-unsupported.window.js +++ /dev/null @@ -1,19 +0,0 @@ -async_test(t => { - if (!window.PerformanceLongTaskTiming) { - assert_unreached("Longtasks are not supported."); - } - new PerformanceObserver(t.step_func(entryList => { - const observer = new PerformanceObserver(t.step_func_done(list => { - list.getEntries().forEach(entry => { - assert_not_equals(entry.entryType, 'longtask'); - }); - })); - observer.observe({type: 'longtask', buffered: true}); - observer.observe({type: 'mark'}); - // Create a mark to ensure the |observer|'s callback is dispatched. - performance.mark('a'); - })).observe({entryTypes: ['longtask']}); - // Create a long task. - const begin = window.performance.now(); - while (window.performance.now() < begin + 60); -}, 'PerformanceObserver with buffered flag cannot see previous longtask entries.'); diff --git a/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js b/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js new file mode 100644 index 00000000000..dafce7ea3bb --- /dev/null +++ b/tests/wpt/web-platform-tests/longtask-timing/buffered-flag.window.js @@ -0,0 +1,26 @@ +async_test(t => { + assert_precondition(window.PerformanceLongTaskTiming, 'Longtasks are not supported.'); + new PerformanceObserver(t.step_func((entryList, obs) => { + const observer = new PerformanceObserver(t.step_func_done(list => { + let longtaskObserved = false; + list.getEntries().forEach(entry => { + if (entry.entryType === 'mark') + return; + assert_equals(entry.entryType, 'longtask'); + assert_equals(entry.name, 'self'); + assert_greater_than(longtask.duration, 50); + longtaskObserved = true; + }); + assert_true(longtaskObserved, 'Did not observe buffered longtask.'); + })); + observer.observe({type: 'longtask', buffered: true}); + // Observer mark so that we can flush the observer callback. + observer.observe({type: 'mark'}); + performance.mark('m'); + // Disconnect the embedding observer so this callback only runs once. + obs.disconnect(); + })).observe({entryTypes: ['longtask']}); + // Create a long task. + const begin = window.performance.now(); + while (window.performance.now() < begin + 60); +}, 'PerformanceObserver with buffered flag can see previous longtask entries.'); diff --git a/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js b/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js index b1de419ca20..224a6078c1e 100644 --- a/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js +++ b/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js @@ -27,6 +27,7 @@ function toMojoNDEFRecord(record) { let nfcRecord = new device.mojom.NDEFRecord(); nfcRecord.recordType = record.recordType; nfcRecord.mediaType = record.mediaType; + nfcRecord.id = record.id; nfcRecord.data = toByteArray(record.data); if (record.data != null && record.data.records !== undefined) { // |record.data| may be an NDEFMessageInit, i.e. the payload is a message. @@ -59,6 +60,12 @@ function toByteArray(data) { function compareNDEFRecords(providedRecord, receivedRecord) { assert_equals(providedRecord.recordType, receivedRecord.recordType); + if (providedRecord.id === undefined) { + assert_equals(null, receivedRecord.id); + } else { + assert_equals(providedRecord.id, receivedRecord.id); + } + if (providedRecord.mediaType === undefined) { assert_equals(null, receivedRecord.mediaType); } else { diff --git a/tests/wpt/web-platform-tests/svg/animations/begin-attribute-mutation.html b/tests/wpt/web-platform-tests/svg/animations/begin-attribute-mutation.html new file mode 100644 index 00000000000..f28c8e9ad1a --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/animations/begin-attribute-mutation.html @@ -0,0 +1,29 @@ + +Mutating the 'begin' attribute after the element has started + + + + + + + + diff --git a/tests/wpt/web-platform-tests/svg/animations/cyclic-syncbase-2.html b/tests/wpt/web-platform-tests/svg/animations/cyclic-syncbase-2.html new file mode 100644 index 00000000000..f48bbffa859 --- /dev/null +++ b/tests/wpt/web-platform-tests/svg/animations/cyclic-syncbase-2.html @@ -0,0 +1,29 @@ + +Cyclic syncbase dependency with syncbase trigger + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/decision.py b/tests/wpt/web-platform-tests/tools/ci/tc/decision.py index a3c47aa4049..92a27ef79ab 100644 --- a/tests/wpt/web-platform-tests/tools/ci/tc/decision.py +++ b/tests/wpt/web-platform-tests/tools/ci/tc/decision.py @@ -194,9 +194,10 @@ cd web-platform-tests; def get_owner(event): - pusher = event.get("pusher", {}).get("email", "") - if "@" in pusher: - return pusher + if "pusher" in event: + pusher = event.get("pusher", {}).get("email", "") + if pusher and "@" in pusher: + return pusher return "web-platform-tests@users.noreply.github.com" diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt index 31545c2f074..194f4284b26 100644 --- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt +++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt @@ -1,3 +1,3 @@ -mypy==0.740 +mypy==0.750 mypy-extensions==0.4.3 typed-ast==1.4.0 diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFRecord_constructor.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFRecord_constructor.https.html index ea7b5e49508..1b2dda9bfc8 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFRecord_constructor.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFRecord_constructor.https.html @@ -18,29 +18,56 @@ test(() => { assert_throws(new TypeError, () => new NDEFRecord( - createRecord('empty', test_text_data, 'text/plain')), + createRecord('empty', test_text_data, test_record_id, 'text/plain')), 'mediaType does not apply for empty record type.'); assert_throws(new TypeError, () => new NDEFRecord( - createRecord('text', test_text_data, 'text/plain')), + createRecord('text', test_text_data, test_record_id, 'text/plain')), 'mediaType does not apply for text record type.'); assert_throws(new TypeError, () => new NDEFRecord( - createRecord('url', test_url_data, 'text/plain')), + createRecord('url', test_url_data, test_record_id, 'text/plain')), 'mediaType does not apply for url record type.'); assert_throws(new TypeError, () => new NDEFRecord( - createRecord('absolute-url', test_url_data, 'text/plain')), + createRecord('absolute-url', test_url_data, test_record_id, 'text/plain')), 'mediaType does not apply for absolute-url record type.'); assert_throws(new TypeError, () => new NDEFRecord( - createRecord('unknown', test_buffer_data, 'application/octet-stream')), + createRecord('unknown', test_buffer_data, test_record_id, 'application/octet-stream')), 'mediaType does not apply for unknown record type.'); assert_throws(new TypeError, () => new NDEFRecord( - createRecord('foo.example.com:bar', test_buffer_data, 'application/octet-stream')), + createRecord('foo.example.com:bar', test_buffer_data, test_record_id, 'application/octet-stream')), 'mediaType does not apply for external record type.'); }, 'NDEFRecord constructor should only accept mediaType for mime record type'); + test(() => { + { + const record = new NDEFRecord(createRecord('text', test_text_data)); + assert_equals(record.id, null, 'id'); + } + { + const record = new NDEFRecord(createRecord('text', test_text_data, '')); + assert_equals(record.id, '', 'id'); + } + { + const dummy_id = 'https://dummy_host/mypath/myid'; + const record = new NDEFRecord(createRecord('text', test_text_data, dummy_id)); + assert_equals(record.id, dummy_id, 'id'); + } + { + const dummy_id = 'http://dummy_host/mypath/myid'; + const record = new NDEFRecord(createRecord('text', test_text_data, dummy_id)); + assert_equals(record.id, dummy_id, 'id'); + } + { + const dummy_id = 'mypath/myid'; + const record = new NDEFRecord(createRecord('text', test_text_data, dummy_id)); + assert_equals(record.id, dummy_id, 'id'); + } + }, 'NDEFRecord constructor with custom record ids'); + test(() => { const record = new NDEFRecord(createTextRecord(test_text_data)); assert_equals(record.recordType, 'text', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_equals(record.encoding, 'utf-8', 'encoding'); assert_equals(record.lang, 'en', 'lang'); const decoder = new TextDecoder(); @@ -56,6 +83,7 @@ const record = new NDEFRecord(createTextRecord(uint8Array.buffer)); assert_equals(record.recordType, 'text', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_equals(record.encoding, 'utf-8', 'encoding'); assert_equals(record.lang, 'en', 'lang'); const decoder = new TextDecoder(); @@ -71,6 +99,7 @@ const record = new NDEFRecord(createTextRecord(uint8Array)); assert_equals(record.recordType, 'text', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_equals(record.encoding, 'utf-8', 'encoding'); assert_equals(record.lang, 'en', 'lang'); const decoder = new TextDecoder(); @@ -87,6 +116,7 @@ const record = new NDEFRecord(createTextRecord(test_text_data, encoding, lang)); assert_equals(record.recordType, 'text', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_equals(record.encoding, encoding, 'encoding'); assert_equals(record.lang, lang, 'lang'); const decoder = new TextDecoder(); @@ -105,6 +135,7 @@ const record = new NDEFRecord(createTextRecord(test_text_data)); assert_equals(record.recordType, 'text', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_equals(record.encoding, 'utf-8', 'encoding'); assert_equals(record.lang, test_lang, 'lang'); const decoder = new TextDecoder(); @@ -116,6 +147,7 @@ const record = new NDEFRecord(createUrlRecord(test_url_data)); assert_equals(record.recordType, 'url', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); const decoder = new TextDecoder(); assert_equals(decoder.decode(record.data), test_url_data, 'data has the same content with the original dictionary'); @@ -127,6 +159,7 @@ const record = new NDEFRecord(createUrlRecord(test_url_data, true)); assert_equals(record.recordType, 'absolute-url', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); const decoder = new TextDecoder(); assert_equals(decoder.decode(record.data), test_url_data, 'data has the same content with the original dictionary'); @@ -146,6 +179,7 @@ const record = new NDEFRecord(createMimeRecord(buffer)); assert_equals(record.recordType, 'mime', 'recordType'); assert_equals(record.mediaType, 'application/octet-stream', 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [1, 2, 3, 4], 'data has the same content with the original buffer'); assert_throws('NotSupportedError', () => record.toRecords(), @@ -156,6 +190,7 @@ let buffer_view = new Uint8Array(buffer, 1); const record = new NDEFRecord(createMimeRecord(buffer_view)); assert_equals(record.recordType, 'mime', 'recordType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [2, 3, 4], 'data has the same content with the original buffer view'); assert_throws('NotSupportedError', () => record.toRecords(), @@ -167,6 +202,7 @@ const record = new NDEFRecord(createMimeRecordFromJson(test_json_data)); assert_equals(record.recordType, 'mime', 'recordType'); assert_equals(record.mediaType, 'application/json', 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_object_equals(JSON.parse(new TextDecoder().decode(record.data)), test_json_data, 'data has the same content with the original json'); @@ -185,6 +221,7 @@ { const record = new NDEFRecord(createUnknownRecord(buffer)); assert_equals(record.recordType, 'unknown', 'recordType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [1, 2, 3, 4], 'data has the same content with the original buffer'); assert_throws('NotSupportedError', () => record.toRecords(), @@ -195,6 +232,7 @@ let buffer_view = new Uint8Array(buffer, 1); const record = new NDEFRecord(createUnknownRecord(buffer_view)); assert_equals(record.recordType, 'unknown', 'recordType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [2, 3, 4], 'data has the same content with the original buffer view'); assert_throws('NotSupportedError', () => record.toRecords(), @@ -211,9 +249,10 @@ new Uint8Array(buffer).set([1, 2, 3, 4]); // Feed ArrayBuffer. { - const record = new NDEFRecord(createRecord('foo.eXamPle.coM:bAr*-', buffer)); + const record = new NDEFRecord(createRecord('foo.eXamPle.coM:bAr*-', buffer, test_record_id)); assert_equals(record.recordType, 'foo.example.com:bAr*-', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [1, 2, 3, 4], 'data has the same content with the original buffer'); assert_equals(record.toRecords(), null, @@ -222,9 +261,11 @@ // Feed ArrayBufferView. { let buffer_view = new Uint8Array(buffer, 1); - const record = new NDEFRecord(createRecord('foo.eXamPle.coM:bAr*-', buffer_view)); + const record = new NDEFRecord(createRecord( + 'foo.eXamPle.coM:bAr*-', buffer_view, test_record_id)); assert_equals(record.recordType, 'foo.example.com:bAr*-', 'recordType'); assert_equals(record.mediaType, null, 'mediaType'); + assert_equals(record.id, test_record_id, 'id'); assert_array_equals(new Uint8Array(record.data.buffer), [2, 3, 4], 'data has the same content with the original buffer view'); assert_equals(record.toRecords(), null, diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html index 6c7aca9fe93..a33b1fab303 100644 --- a/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html +++ b/tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html @@ -30,7 +30,6 @@ const invalid_type_messages = // NDEFRecord.data for 'text' record must be either a string, // an arrayBuffer, or an arrayBufferView. createMessage([createTextRecord(test_json_data)]), - createMessage([createTextRecord(test_number_data)]), // NDEFRecord.encoding for 'text' record must be either "utf-8", // "utf-16", "utf-16le" or "utf-16be". @@ -49,12 +48,10 @@ const invalid_type_messages = // NDEFRecord.data for 'url' record must be string. createMessage([createUrlRecord(test_buffer_data)]), - createMessage([createUrlRecord(test_number_data)]), createMessage([createUrlRecord(test_json_data)]), // NDEFRecord.data for 'absolute-url' record must be string. createMessage([createUrlRecord(test_buffer_data, true)]), - createMessage([createUrlRecord(test_number_data, true)]), createMessage([createUrlRecord(test_json_data, true)]), // https://w3c.github.io/web-nfc/#dfn-map-binary-data-to-ndef diff --git a/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js b/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js index 0fe6fe80cb1..3ce725a7c47 100644 --- a/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js +++ b/tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js @@ -64,6 +64,7 @@ const test_buffer_data = new ArrayBuffer(test_text_byte_array.length); const test_buffer_view = new Uint8Array(test_buffer_data); test_buffer_view.set(test_text_byte_array); const fake_tag_serial_number = 'c0:45:00:02'; +const test_record_id = '/test_path/test_id'; const NFCHWStatus = {}; // OS-level NFC setting is ON @@ -81,10 +82,12 @@ function createMessage(records) { } } -function createRecord(recordType, data, mediaType, encoding, lang) { +function createRecord(recordType, data, id, mediaType, encoding, lang) { let record = {}; if (recordType !== undefined) record.recordType = recordType; + if (id !== undefined) + record.id = id; if (mediaType !== undefined) record.mediaType = mediaType; if (encoding !== undefined) @@ -97,28 +100,29 @@ function createRecord(recordType, data, mediaType, encoding, lang) { } function createTextRecord(data, encoding, lang) { - return createRecord('text', data, undefined, encoding, lang); + return createRecord('text', data, test_record_id, undefined, encoding, lang); } function createMimeRecordFromJson(json) { return createRecord( 'mime', new TextEncoder('utf-8').encode(JSON.stringify(json)), - 'application/json'); + test_record_id, 'application/json'); } function createMimeRecord(buffer) { - return createRecord('mime', buffer, 'application/octet-stream'); + return createRecord( + 'mime', buffer, test_record_id, 'application/octet-stream'); } function createUnknownRecord(buffer) { - return createRecord('unknown', buffer); + return createRecord('unknown', buffer, test_record_id); } function createUrlRecord(url, isAbsUrl) { if (isAbsUrl) { - return createRecord('absolute-url', url); + return createRecord('absolute-url', url, test_record_id); } - return createRecord('url', url); + return createRecord('url', url, test_record_id); } function createNDEFPushOptions(target, ignoreRead) { @@ -135,9 +139,11 @@ function assertNDEFMessagesEqual(providedMessage, receivedMessage) { let provided = providedMessage; if (providedMessage instanceof ArrayBuffer || ArrayBuffer.isView(providedMessage)) - provided = createMessage([createMimeRecord(providedMessage)]); + provided = createMessage([createRecord( + 'mime', providedMessage, undefined /* id */, + 'application/octet-stream')]); else if (typeof providedMessage === 'string') - provided = createMessage([createTextRecord(providedMessage)]); + provided = createMessage([createRecord('text', providedMessage)]); assert_equals(provided.records.length, receivedMessage.data.length, 'NDEFMessages must have same number of NDEFRecords'); @@ -161,6 +167,7 @@ function assertWebNDEFMessagesEqual(message, expectedMessage) { let expectedRecord = expectedMessage.records[i]; assert_equals(record.recordType, expectedRecord.recordType); assert_equals(record.mediaType, expectedRecord.mediaType); + assert_equals(record.id, expectedRecord.id); // Compares record data assert_array_equals(new Uint8Array(record.data),