aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-11-11 10:42:29 -0500
committerGitHub <noreply@github.com>2019-11-11 10:42:29 -0500
commit06e58212cbca2ff6b24f0ad6e1e1c01237da480d (patch)
tree208b2262970883dde565fe2e52beb0a0cfb58f54
parentf7fb130a2a21ae19cf0996251134ad23fea9068d (diff)
parent44245eaead4fe61a5d6537a531b20a1c98e3752b (diff)
downloadservo-06e58212cbca2ff6b24f0ad6e1e1c01237da480d.tar.gz
servo-06e58212cbca2ff6b24f0ad6e1e1c01237da480d.zip
Auto merge of #24705 - servo-wpt-sync:wpt_update_11-11-2019, r=jdm
Sync WPT with upstream (11-11-2019) Automated downstream sync of changes from upstream as of 11-11-2019. [no-wpt-sync] r? @servo-wpt-sync
-rw-r--r--tests/wpt/metadata/FileAPI/url/url-in-tags-revoke.window.js.ini2
-rw-r--r--tests/wpt/metadata/MANIFEST.json30
-rw-r--r--tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini2
-rw-r--r--tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini2
-rw-r--r--tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini2
-rw-r--r--tests/wpt/metadata/fetch/content-type/response.window.js.ini13
-rw-r--r--tests/wpt/metadata/fetch/content-type/script.window.js.ini5
-rw-r--r--tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini2
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini (renamed from tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini)2
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini4
-rw-r--r--tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini34
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini2
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini2
-rw-r--r--tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini4
-rw-r--r--tests/wpt/metadata/html/semantics/forms/the-button-element/button-submit-children.html.ini5
-rw-r--r--tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini1
-rw-r--r--tests/wpt/metadata/webmessaging/with-ports/018.html.ini (renamed from tests/wpt/metadata/webmessaging/without-ports/018.html.ini)0
-rw-r--r--tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini1
-rw-r--r--tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini2
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/createpr.pngbin6592 -> 2118 bytes
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/pullrequestbtn.pngbin5602 -> 1604 bytes
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/reftest-tutorial-test-screenshot.pngbin20239 -> 14308 bytes
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.pngbin30577 -> 20826 bytes
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.pngbin35234 -> 24180 bytes
-rw-r--r--tests/wpt/web-platform-tests/docs/assets/web-platform.pngbin33622 -> 11819 bytes
-rw-r--r--tests/wpt/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html37
-rw-r--r--tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js10
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/NDEFMessage_constructor.https.html2
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html10
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html4
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/NDEFRecord_constructor.https.html59
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/NDEFWriter_push.https.html33
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/idlharness.https.window.js1
-rw-r--r--tests/wpt/web-platform-tests/web-nfc/resources/nfc-helpers.js16
34 files changed, 154 insertions, 133 deletions
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 a9e46713244..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
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index ace6e811425..2d83d384e56 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -633571,7 +633571,7 @@
"support"
],
"docs/assets/createpr.png": [
- "7b232a86d0f6257c451828abbb4ac41b48d2ba85",
+ "4403a95c146c1aaba697a5198852548d948a5461",
"support"
],
"docs/assets/files-changed.png": [
@@ -633599,11 +633599,11 @@
"support"
],
"docs/assets/pullrequestbtn.png": [
- "0fb15da15387ed4bf32a14e01536c7d2b4f81030",
+ "07d9c6a2e94122c94ae4d3802e09d9bbaea3296d",
"support"
],
"docs/assets/reftest-tutorial-test-screenshot.png": [
- "611fffbd220b8a8ab56216786dd3f85e2934906b",
+ "8d882822e1274124249be51cc2af26be0c23f340",
"support"
],
"docs/assets/reftest_graph_example.svg": [
@@ -633611,15 +633611,15 @@
"support"
],
"docs/assets/testharness-tutorial-test-screenshot-1.png": [
- "5195ba25ae647acdc1dc9cd3877d1204abab95df",
+ "c469e94a553c2f780dfd297bf127990674b142cc",
"support"
],
"docs/assets/testharness-tutorial-test-screenshot-2.png": [
- "0010a57173121330bae8df3c3f851db10cffcb67",
+ "612eda54487bd8e8808e8c8a3e87d0f221e55d00",
"support"
],
"docs/assets/web-platform.png": [
- "2b14c5ef60dd064b8751151f5b778019fe2431bf",
+ "8547f491835ea2b11c69ff66f834ebc747af7fab",
"support"
],
"docs/conf.py": [
@@ -635095,7 +635095,7 @@
"testharness"
],
"dom/nodes/aria-element-reflection.tentative.html": [
- "7c8e690a28bbcaa1391878300f143aa1e584fe5e",
+ "1ee896ea1be0cae1613a880fbdea547f1894839f",
"testharness"
],
"dom/nodes/attributes.html": [
@@ -693427,7 +693427,7 @@
"support"
],
"resources/chromium/nfc-mock.js": [
- "ce22a9c2cfe9c0ae460d6e1eff4aaa99fe6b24e3",
+ "f5666c18f5c57fdc8ee74c1572824f34e346d5ed",
"support"
],
"resources/chromium/sensor.mojom.js": [
@@ -716191,7 +716191,7 @@
"testharness"
],
"web-nfc/NDEFMessage_constructor.https.html": [
- "ce212136023058dd6597ff925fd68a73e5d2ab95",
+ "f32f179b95798fe590a518603eff35265cd51494",
"testharness"
],
"web-nfc/NDEFReader-document-hidden-manual.https.html": [
@@ -716199,11 +716199,11 @@
"manual"
],
"web-nfc/NDEFReader_options.https.html": [
- "b1452c0240d176316341a0ab6857433fbc99a5b5",
+ "81b051e28f4723624846d25aa49d16525c81d1a9",
"testharness"
],
"web-nfc/NDEFReader_scan.https.html": [
- "a26a548c6392d8116e8c188d6dbbe03b4660d87f",
+ "7c78a1c6008429dc348efa2c02c83c47e0a565a4",
"testharness"
],
"web-nfc/NDEFReader_scan_iframe.https.html": [
@@ -716215,7 +716215,7 @@
"testharness"
],
"web-nfc/NDEFRecord_constructor.https.html": [
- "6028e970b879b1f65dd48d64525995114b5e82e9",
+ "79ce8a076eda26a7657df6eba8b781f711a94abb",
"testharness"
],
"web-nfc/NDEFWriter-document-hidden-manual.https.html": [
@@ -716223,7 +716223,7 @@
"manual"
],
"web-nfc/NDEFWriter_push.https.html": [
- "f8b461c42d5ee0265f1301458b8e92a812e650da",
+ "57c619f73f84a90de32d33957e4757eca1c8e464",
"testharness"
],
"web-nfc/README.md": [
@@ -716231,7 +716231,7 @@
"support"
],
"web-nfc/idlharness.https.window.js": [
- "f59ad9b512ed5548b22ff43b84f8404258e9e6c9",
+ "74ffc21b2204ea894dcea32a4aface9bc69739c1",
"testharness"
],
"web-nfc/nfc_insecure_context.html": [
@@ -716239,7 +716239,7 @@
"testharness"
],
"web-nfc/resources/nfc-helpers.js": [
- "bdd8290d9eb7f9fcae1e46820a64fc6cef8617e5",
+ "f90a050c4cad93e31937bca946f3c250bb64723c",
"support"
],
"web-nfc/resources/support-iframe.html": [
diff --git a/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini b/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini
index 1193e3dfa5c..03f2f3fe9d1 100644
--- a/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini
+++ b/tests/wpt/metadata/css/css-transforms/animation/perspective-interpolation.html.ini
@@ -1,5 +1,5 @@
[perspective-interpolation.html]
- expected: ERROR
+ expected: CRASH
[ perspective interpolation]
expected: FAIL
diff --git a/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini
new file mode 100644
index 00000000000..e6e1f29e274
--- /dev/null
+++ b/tests/wpt/metadata/css/cssom-view/matchMedia-display-none-iframe.html.ini
@@ -0,0 +1,2 @@
+[matchMedia-display-none-iframe.html]
+ expected: ERROR
diff --git a/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini
new file mode 100644
index 00000000000..c3916f8555d
--- /dev/null
+++ b/tests/wpt/metadata/dom/nodes/Document-contentType/contentType/contenttype_txt.html.ini
@@ -0,0 +1,2 @@
+[contenttype_txt.html]
+ expected: CRASH
diff --git a/tests/wpt/metadata/fetch/content-type/response.window.js.ini b/tests/wpt/metadata/fetch/content-type/response.window.js.ini
index de468ea0db0..c42d4e59776 100644
--- a/tests/wpt/metadata/fetch/content-type/response.window.js.ini
+++ b/tests/wpt/metadata/fetch/content-type/response.window.js.ini
@@ -312,21 +312,18 @@
[<iframe>: separate response Content-Type: */* text/html]
expected: FAIL
- [<iframe>: combined response Content-Type: */* text/html]
- expected: FAIL
-
- [<iframe>: separate response Content-Type: text/html;x=" text/plain]
- expected: FAIL
-
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
- [<iframe>: separate response Content-Type: text/plain */*]
+ [<iframe>: separate response Content-Type: text/html;" \\" text/plain]
expected: FAIL
- [<iframe>: separate response Content-Type: text/html;" \\" text/plain]
+ [<iframe>: separate response Content-Type: text/html */*]
+ expected: FAIL
+
+ [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL
diff --git a/tests/wpt/metadata/fetch/content-type/script.window.js.ini b/tests/wpt/metadata/fetch/content-type/script.window.js.ini
index 279734168dc..2d5faa72ac7 100644
--- a/tests/wpt/metadata/fetch/content-type/script.window.js.ini
+++ b/tests/wpt/metadata/fetch/content-type/script.window.js.ini
@@ -53,9 +53,6 @@
[combined text/javascript ]
expected: FAIL
- [separate text/javascript x/x]
- expected: FAIL
-
- [separate text/javascript;charset=windows-1252 text/javascript]
+ [separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
diff --git a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini
index 536384f36e1..2023a855086 100644
--- a/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini
+++ b/tests/wpt/metadata/fetch/nosniff/parsing-nosniff.window.js.ini
@@ -11,6 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL
- [X-Content-Type-Options%3A%20%2Cnosniff]
+ [X-Content-Type-Options%3A%20no%0D%0AX-Content-Type-Options%3A%20nosniff]
expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini
index dc2e45516de..51f8272a6de 100644
--- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_5.html.ini
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_3.html.ini
@@ -1,4 +1,4 @@
-[traverse_the_history_5.html]
+[traverse_the_history_3.html]
[Multiple history traversals, last would be aborted]
expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
new file mode 100644
index 00000000000..385376c7321
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_4.html.ini
@@ -0,0 +1,4 @@
+[traverse_the_history_4.html]
+ [Multiple history traversals, last would be aborted]
+ expected: FAIL
+
diff --git a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini
index 28f93ee71b5..9d841e61bc0 100644
--- a/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini
+++ b/tests/wpt/metadata/html/browsers/the-window-object/apis-for-creating-and-navigating-browsing-contexts-by-name/open-features-non-integer-width.html.ini
@@ -1,32 +1,48 @@
[open-features-non-integer-width.html]
type: testharness
+ expected: TIMEOUT
[HTML: window.open `features`: non-integer values for feature `width`]
expected: FAIL
[features "width=405^4" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405.5" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405e1" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405 " should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405.32" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405LLl" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405*3" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405e-1" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
[features "width=405/5" should set "width=405"]
- expected: FAIL
+ expected: TIMEOUT
+
+ [top=0,left=0: absence of feature "width" should be treated same as "width=0"]
+ expected: TIMEOUT
+
+ [features "width=_404" should NOT set "width=404"]
+ expected: TIMEOUT
+
+ [top=0,left=0,height=401,: absence of feature "width" should be treated same as "width=0"]
+ expected: TIMEOUT
+
+ [features "width=/404" should NOT set "width=404"]
+ expected: TIMEOUT
+
+ [features "width=L404" should NOT set "width=404"]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
index 2a166bb97b7..fc37df7e3fa 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
@@ -1,6 +1,6 @@
[iframe_sandbox_popups_escaping-1.html]
type: testharness
- expected: CRASH
+ expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
index 963d4cd20ef..9df1ac56f2a 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-1.html.ini
@@ -1,6 +1,6 @@
[iframe_sandbox_popups_nonescaping-1.html]
type: testharness
- expected: CRASH
+ expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: NOTRUN
diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini
index e6022ce120f..b024b42f41f 100644
--- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini
+++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/form-submission-algorithm.html.ini
@@ -1,5 +1,4 @@
[form-submission-algorithm.html]
- expected: TIMEOUT
[If form's firing submission events is true, then return; 'submit' event]
expected: FAIL
@@ -12,9 +11,6 @@
[firing an event named submit; clicking a submit button]
expected: FAIL
- [Cannot navigate (after constructing the entry list)]
- expected: TIMEOUT
-
[firing an event named submit; form.requestSubmit(null)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/forms/the-button-element/button-submit-children.html.ini b/tests/wpt/metadata/html/semantics/forms/the-button-element/button-submit-children.html.ini
new file mode 100644
index 00000000000..dbb4c200800
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/forms/the-button-element/button-submit-children.html.ini
@@ -0,0 +1,5 @@
+[button-submit-children.html]
+ expected: TIMEOUT
+ [This test will pass if a form navigation successfully occurs when clicking a child element of a <button type=submit> element with a onclick event handler which prevents the default form submission and manually calls form.submit() instead.]
+ expected: TIMEOUT
+
diff --git a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini
index a56bad443a2..66bd350083b 100644
--- a/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini
+++ b/tests/wpt/metadata/webaudio/the-audio-api/the-analysernode-interface/realtimeanalyser-fft-scaling.html.ini
@@ -1,5 +1,4 @@
[realtimeanalyser-fft-scaling.html]
- expected: TIMEOUT
[X 2048-point FFT peak position is not equal to 64. Got 0.]
expected: FAIL
diff --git a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini
index 663a1f8fa30..663a1f8fa30 100644
--- a/tests/wpt/metadata/webmessaging/without-ports/018.html.ini
+++ b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini
diff --git a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini
index 650c91da4a6..333edb3a26e 100644
--- a/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini
+++ b/tests/wpt/metadata/workers/baseurl/alpha/sharedworker-in-worker.html.ini
@@ -1,5 +1,4 @@
[sharedworker-in-worker.html]
- expected: ERROR
[Base URL in workers: new SharedWorker()]
expected: FAIL
diff --git a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini b/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini
deleted file mode 100644
index 80f9a4f15b8..00000000000
--- a/tests/wpt/metadata/workers/constructors/Worker/Worker-constructor.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[Worker-constructor.html]
- expected: ERROR
diff --git a/tests/wpt/web-platform-tests/docs/assets/createpr.png b/tests/wpt/web-platform-tests/docs/assets/createpr.png
index 7b232a86d0f..4403a95c146 100644
--- a/tests/wpt/web-platform-tests/docs/assets/createpr.png
+++ b/tests/wpt/web-platform-tests/docs/assets/createpr.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/docs/assets/pullrequestbtn.png b/tests/wpt/web-platform-tests/docs/assets/pullrequestbtn.png
index 0fb15da1538..07d9c6a2e94 100644
--- a/tests/wpt/web-platform-tests/docs/assets/pullrequestbtn.png
+++ b/tests/wpt/web-platform-tests/docs/assets/pullrequestbtn.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/docs/assets/reftest-tutorial-test-screenshot.png b/tests/wpt/web-platform-tests/docs/assets/reftest-tutorial-test-screenshot.png
index 611fffbd220..8d882822e12 100644
--- a/tests/wpt/web-platform-tests/docs/assets/reftest-tutorial-test-screenshot.png
+++ b/tests/wpt/web-platform-tests/docs/assets/reftest-tutorial-test-screenshot.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png
index 5195ba25ae6..c469e94a553 100644
--- a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png
+++ b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-1.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png
index 0010a571731..612eda54487 100644
--- a/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png
+++ b/tests/wpt/web-platform-tests/docs/assets/testharness-tutorial-test-screenshot-2.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/docs/assets/web-platform.png b/tests/wpt/web-platform-tests/docs/assets/web-platform.png
index 2b14c5ef60d..8547f491835 100644
--- a/tests/wpt/web-platform-tests/docs/assets/web-platform.png
+++ b/tests/wpt/web-platform-tests/docs/assets/web-platform.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html b/tests/wpt/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html
index 7c8e690a28b..1ee896ea1be 100644
--- a/tests/wpt/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html
+++ b/tests/wpt/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html
@@ -164,20 +164,27 @@
<script>
test(function(t) {
- // Deleting an element set via the content attribute.
+ const idlAttrElement = document.getElementById("idlAttrElement");
+
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "contentAttrElement");
assert_equals(deletionParent.ariaActiveDescendantElement, contentAttrElement);
+ // Deleting an element set via the content attribute.
deletionParent.removeChild(contentAttrElement);
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "contentAttrElement");
+
+ // As it was not explitly set, the attr-associated-element is computed from the content attribute,
+ // and since descendant1 has been removed from the DOM, it is not valid.
assert_equals(deletionParent.ariaActiveDescendantElement, null);
// Deleting an element set via the IDL attribute.
deletionParent.ariaActiveDescendantElement = idlAttrElement;
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
+ // The element is still retrieved because it was explicitly set, and was at that point
+ // in a valid scope.
deletionParent.removeChild(idlAttrElement);
- assert_equals(deletionParent.ariaActiveDescendantElement, null);
+ assert_equals(deletionParent.ariaActiveDescendantElement, idlAttrElement);
// The content attribute will still reflect the id.
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
@@ -227,14 +234,16 @@
lightParent.ariaActiveDescendantElement = lightElement;
assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
- // Move the referenced element into shadow DOM.
+ // Move the referenced element into shadow DOM. As it was explicitly set,
+ // it is still able to be gotten even though it is in a different scope.
shadowRoot.appendChild(lightElement);
- assert_equals(lightParent.ariaActiveDescendantElement, null);
+ assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
// Move the referenced element back into light DOM.
lightParent.appendChild(lightElement);
assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
+ assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
}, "Reparenting an element into a descendant shadow scope nullifies the element reference.");
</script>
@@ -250,6 +259,7 @@
<script>
test(function(t) {
+ const billingElement = document.getElementById("billingElement")
assert_array_equals(input1.ariaLabelledByElements, [billingElement, nameElement], "parsed content attribute sets element references.");
assert_equals(input2.ariaLabelledByElements, null, "Testing empty content attribute after parsing.");
@@ -257,8 +267,10 @@
assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement], "Testing IDL setter/getter.");
assert_equals(input2.getAttribute("aria-labelledby"), "billingElement addressElement");
+ // Remove the element from the DOM, but as it was explicitly set whilst in a valid scope
+ // it can still be retrieved.
billingElement.remove();
- assert_array_equals(input2.ariaLabelledByElements, [addressElement]);
+ assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement]);
input2.ariaLabelledByElements = [];
assert_array_equals(input2.ariaLabelledByElements, [], "Testing IDL setter/getter for empty array.");
@@ -451,9 +463,9 @@
innerShadowRoot.appendChild(description1);
innerShadowRoot.appendChild(description2);
- // Explicitly set elements are still present, but are not retrieved.
- // content attribute is still stale because all elements were in a valid scope when they were set.
- assert_array_equals(describedElement.ariaDescribedByElements, []);
+ // Explicitly set elements are still retrieved, because they were in a valid scope when they were set.
+ // The content attribute still reflects the ids.
+ assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
// Move into the same shadow scope as the explicitly set elements to test that the elements are gettable
@@ -494,10 +506,9 @@
headingElement.ariaLabelledByElements = [headingLabel1, headingLabel2];
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2", "Elements are set again, so the content attribute is updated.");
- // Remove the referring element from the DOM, elements are not gettable.
- // This behaviour is still under discussion.
+ // Remove the referring element from the DOM, elements are gettable.
headingElement.remove();
- assert_array_equals(headingElement.ariaLabelledByElements, [], "Element is no longer in the document, so references should not be gettable.");
+ assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Element is no longer in the document, but references should be gettable.");
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
// Insert it back in.
@@ -505,10 +516,10 @@
assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
- // Remove everything from the DOM, nothing should be gettable.
+ // Remove everything from the DOM, everything is still gettable.
headingLabel1.remove();
headingLabel2.remove();
- assert_array_equals(headingElement.ariaLabelledByElements, []);
+ assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
assert_equals(document.getElementById("headingLabel1"), null);
assert_equals(document.getElementById("headingLabel2"), null);
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 ce22a9c2cfe..f5666c18f5c 100644
--- a/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js
+++ b/tests/wpt/web-platform-tests/resources/chromium/nfc-mock.js
@@ -59,11 +59,11 @@ function toByteArray(data) {
function compareNDEFRecords(providedRecord, receivedRecord) {
assert_equals(providedRecord.recordType, receivedRecord.recordType);
- // Compares media types without charset.
- // Charset should be compared when watch method is implemented, in order
- // to check that written and read strings are equal.
- assert_equals(providedRecord.mediaType,
- receivedRecord.mediaType.substring(0, providedRecord.mediaType.length));
+ if (providedRecord.mediaType === undefined) {
+ assert_equals(null, receivedRecord.mediaType);
+ } else {
+ assert_equals(providedRecord.mediaType, receivedRecord.mediaType);
+ }
assert_not_equals(providedRecord.recordType, 'empty');
diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFMessage_constructor.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFMessage_constructor.https.html
index ce212136023..f32f179b957 100644
--- a/tests/wpt/web-platform-tests/web-nfc/NDEFMessage_constructor.https.html
+++ b/tests/wpt/web-platform-tests/web-nfc/NDEFMessage_constructor.https.html
@@ -22,7 +22,7 @@
createMessage([createTextRecord(test_text_data)]));
assert_equals(message.records.length, 1, 'one text record');
assert_equals(message.records[0].recordType, 'text', 'messageType');
- assert_equals(message.records[0].mediaType, 'text/plain', 'mediaType');
+ assert_equals(message.records[0].mediaType, null, 'mediaType');
assert_equals(message.records[0].encoding, 'utf-8', 'encoding');
assert_equals(message.records[0].lang, 'en', 'lang');
assert_true(message.records[0].data instanceof DataView,
diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html
index b1452c0240d..81b051e28f4 100644
--- a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html
+++ b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_options.https.html
@@ -17,7 +17,7 @@ const NDEFReaderOptionTests =
" recordType is set to 'empty'.",
scanOptions: {recordType: "empty"},
unmatchedScanOptions: {recordType: "mime"},
- message: createMessage([createRecord('empty', '')])
+ message: createMessage([createRecord('empty')])
},
{
desc: "Test that reading data succeed when NDEFScanOptions'" +
@@ -59,8 +59,7 @@ const NDEFReaderOptionTests =
" recordType is set to a custom type for external type records.",
scanOptions: {recordType: "w3.org:xyz"},
unmatchedScanOptions: {recordType: "mime"},
- message: createMessage([createRecord('w3.org:xyz', 'application/octet-stream',
- test_buffer_data)])
+ message: createMessage([createRecord('w3.org:xyz', test_buffer_data)])
},
{
desc: "Test that the url of NDEFScanOptions filters relevant data" +
@@ -85,7 +84,7 @@ const ReadMultiMessagesTests =
desc: "Test that filtering 'empty' record from different messages" +
" correctly with NDEFScanOptions' recordType is set to 'empty'.",
scanOptions: {recordType: "empty"},
- message: createMessage([createRecord('empty', '')]),
+ message: createMessage([createRecord('empty')]),
unmatchedMessage: createMessage([createMimeRecordFromJson(test_json_data)]),
},
{
@@ -127,8 +126,7 @@ const ReadMultiMessagesTests =
desc: "Test that filtering external record from different messages" +
" correctly with NDEFScanOptions' recordType is set to the custom type.",
scanOptions: {recordType: "w3.org:xyz"},
- message: createMessage([createRecord('w3.org:xyz', 'application/octet-stream',
- test_buffer_data)]),
+ message: createMessage([createRecord('w3.org:xyz', test_buffer_data)]),
unmatchedMessage: createMessage([createTextRecord(test_text_data)])
},
{
diff --git a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html
index a26a548c639..7c78a1c6008 100644
--- a/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html
+++ b/tests/wpt/web-platform-tests/web-nfc/NDEFReader_scan.https.html
@@ -190,7 +190,7 @@ nfc_test(async (t, mockNFC) => {
const payloadMessage = createMessage([createTextRecord(test_text_data)]);
const message = createMessage([createRecord('example.com:payloadIsMessage',
- undefined, payloadMessage)]);
+ payloadMessage)]);
mockNFC.setReadingMessage(message);
reader.scan({signal : controller.signal});
@@ -204,7 +204,7 @@ nfc_test(async (t, mockNFC) => {
const embeddedRecords = event.message.records[0].toRecords();
assert_equals(embeddedRecords.length, 1);
assert_equals(embeddedRecords[0].recordType, 'text', 'recordType');
- assert_equals(embeddedRecords[0].mediaType, 'text/plain', 'mediaType');
+ assert_equals(embeddedRecords[0].mediaType, null, 'mediaType');
const decoder = new TextDecoder();
assert_equals(decoder.decode(embeddedRecords[0].data), test_text_data,
'data has the same content with the original dictionary');
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 6028e970b87..79ce8a076ed 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
@@ -17,9 +17,30 @@
}, 'NDEFRecord constructor with null init dict');
test(() => {
+ assert_throws(new TypeError, () => new NDEFRecord(
+ createRecord('empty', test_text_data, 'text/plain')),
+ 'mediaType does not apply for empty record type.');
+ assert_throws(new TypeError, () => new NDEFRecord(
+ createRecord('text', test_text_data, 'text/plain')),
+ 'mediaType does not apply for text record type.');
+ assert_throws(new TypeError, () => new NDEFRecord(
+ createRecord('url', test_url_data, 'text/plain')),
+ 'mediaType does not apply for url record type.');
+ assert_throws(new TypeError, () => new NDEFRecord(
+ createRecord('absolute-url', test_url_data, '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')),
+ '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')),
+ 'mediaType does not apply for external record type.');
+ }, 'NDEFRecord constructor should only accept mediaType for mime record type');
+
+ test(() => {
const record = new NDEFRecord(createTextRecord(test_text_data));
assert_equals(record.recordType, 'text', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_equals(record.encoding, 'utf-8', 'encoding');
assert_equals(record.lang, 'en', 'lang');
const decoder = new TextDecoder();
@@ -32,7 +53,7 @@
const uint8Array = encoder.encode(test_text_data);
const record = new NDEFRecord(createTextRecord(uint8Array.buffer));
assert_equals(record.recordType, 'text', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_equals(record.encoding, 'utf-8', 'encoding');
assert_equals(record.lang, 'en', 'lang');
const decoder = new TextDecoder();
@@ -45,7 +66,7 @@
const uint8Array = encoder.encode(test_text_data);
const record = new NDEFRecord(createTextRecord(uint8Array));
assert_equals(record.recordType, 'text', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_equals(record.encoding, 'utf-8', 'encoding');
assert_equals(record.lang, 'en', 'lang');
const decoder = new TextDecoder();
@@ -59,7 +80,7 @@
const lang = 'fr';
const record = new NDEFRecord(createTextRecord(test_text_data, encoding, lang));
assert_equals(record.recordType, 'text', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_equals(record.encoding, encoding, 'encoding');
assert_equals(record.lang, lang, 'lang');
const decoder = new TextDecoder();
@@ -77,7 +98,7 @@
});
const record = new NDEFRecord(createTextRecord(test_text_data));
assert_equals(record.recordType, 'text', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_equals(record.encoding, 'utf-8', 'encoding');
assert_equals(record.lang, test_lang, 'lang');
const decoder = new TextDecoder();
@@ -88,7 +109,7 @@
test(() => {
const record = new NDEFRecord(createUrlRecord(test_url_data));
assert_equals(record.recordType, 'url', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
const decoder = new TextDecoder();
assert_equals(decoder.decode(record.data), test_url_data,
'data has the same content with the original dictionary');
@@ -97,7 +118,7 @@
test(() => {
const record = new NDEFRecord(createUrlRecord(test_url_data, true));
assert_equals(record.recordType, 'absolute-url', 'recordType');
- assert_equals(record.mediaType, 'text/plain', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
const decoder = new TextDecoder();
assert_equals(decoder.decode(record.data), test_url_data,
'data has the same content with the original dictionary');
@@ -166,9 +187,9 @@
let buffer_view = new Uint8Array(buffer);
let original_data = new Uint8Array([1, 2, 3, 4]);
buffer_view.set(original_data);
- const record = new NDEFRecord(createRecord('foo.eXamPle.coM:bAr*-', undefined, buffer));
+ const record = new NDEFRecord(createRecord('foo.eXamPle.coM:bAr*-', buffer));
assert_equals(record.recordType, 'foo.example.com:bAr*-', 'recordType');
- assert_equals(record.mediaType, 'application/octet-stream', 'mediaType');
+ assert_equals(record.mediaType, null, 'mediaType');
assert_array_equals(new Uint8Array(record.data.buffer), original_data,
'data has the same content with the original buffer');
}, 'NDEFRecord constructor with external record type');
@@ -176,29 +197,27 @@
test(() => {
assert_throws(new TypeError, () => new NDEFRecord(createRecord('EMptY')),
'Unknown record type.');
- assert_throws(new TypeError, () => new NDEFRecord(createRecord('TeXt', '', test_text_data)),
- 'Unknown record type.');
- assert_throws(new TypeError, () => new NDEFRecord(createRecord('uRL', '', test_url_data)),
+ assert_throws(new TypeError, () => new NDEFRecord(createRecord('TeXt', test_text_data)),
'Unknown record type.');
- assert_throws(new TypeError, () => new NDEFRecord(createRecord('jSoN', '', test_json_data)),
+ assert_throws(new TypeError, () => new NDEFRecord(createRecord('uRL', test_url_data)),
'Unknown record type.');
- assert_throws(new TypeError, () => new NDEFRecord(createRecord('OpaQUE', '', test_buffer_data)),
+ assert_throws(new TypeError, () => new NDEFRecord(createRecord('Mime', test_buffer_data)),
'Unknown record type.');
- assert_throws(new TypeError, () => new NDEFRecord(createRecord('sMart-PosTER', '', test_url_data)),
+ assert_throws(new TypeError, () => new NDEFRecord(createRecord('sMart-PosTER', test_url_data)),
'Unknown record type.');
}, 'NDEFRecord constructor with record type string being treated as case sensitive');
test(() => {
assert_throws(new TypeError, () => new NDEFRecord(createRecord(
- ':xyz', '', test_buffer_data)), 'The domain should not be empty.');
+ ':xyz', test_buffer_data)), 'The domain should not be empty.');
assert_throws(new TypeError, () => new NDEFRecord(createRecord(
- '[:xyz', '', test_buffer_data)), '"[" is not a valid FQDN.');
+ '[:xyz', test_buffer_data)), '"[" is not a valid FQDN.');
assert_throws(new TypeError, () => new NDEFRecord(createRecord(
- 'example.com:', '', test_buffer_data)), 'The type should not be empty.');
+ 'example.com:', test_buffer_data)), 'The type should not be empty.');
assert_throws(new TypeError, () => new NDEFRecord(createRecord(
- 'example.com:xyz~', '', test_buffer_data)), 'The type should not contain \'~\'.');
+ 'example.com:xyz~', test_buffer_data)), 'The type should not contain \'~\'.');
assert_throws(new TypeError, () => new NDEFRecord(createRecord(
- 'example.com:xyz/', '', test_buffer_data)), 'The type should not contain \'/\'.');
+ 'example.com:xyz/', test_buffer_data)), 'The type should not contain \'/\'.');
}, 'NDEFRecord constructor with invalid external record type');
</script>
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 f8b461c42d5..57c619f73f8 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
@@ -76,25 +76,21 @@ const invalid_type_messages =
// https://w3c.github.io/web-nfc/#dfn-map-external-data-to-ndef
// NDEFRecord must have data.
- createMessage([createRecord('w3.org:xyz', '', undefined)]),
+ createMessage([createRecord('w3.org:xyz')]),
// NDEFRecord.data for external record must be ArrayBuffer.
- createMessage([createRecord('w3.org:xyz', '', test_text_data)]),
- createMessage([createRecord('w3.org:xyz', '', test_number_data)]),
- createMessage([createRecord('w3.org:xyz', '', test_json_data)]),
+ createMessage([createRecord('w3.org:xyz', test_text_data)]),
+ createMessage([createRecord('w3.org:xyz', test_number_data)]),
+ createMessage([createRecord('w3.org:xyz', test_json_data)]),
// https://w3c.github.io/web-nfc/#the-ndefrecordtype-string
// The record type is neither a known type ('text', 'mime' etc.) nor a
// valid custom type for an external type record.
- createMessage([createRecord('unmatched_type', '', test_buffer_data)])
+ createMessage([createRecord('unmatched_type', test_buffer_data)])
];
const invalid_syntax_messages =
[
- // NDEFRecord.mediaType for 'text' record must be 'text/*'.
- createMessage([createRecord('text', 'application/json',
- test_text_data)]),
-
// Data for 'url' or 'absolute-url' record, must be a valid URL.
createMessage([createUrlRecord('Invalid URL:// Data')]),
createMessage([createUrlRecord('Invalid URL:// Data', true)]),
@@ -294,7 +290,7 @@ nfc_test(async (t, mockNFC) => {
createUnknownRecord(test_buffer_data),
createUrlRecord(test_url_data),
createUrlRecord(test_url_data, true),
- createRecord('w3.org:xyz', '', test_buffer_data)],
+ createRecord('w3.org:xyz', test_buffer_data)],
test_message_origin);
await writer.push(message);
assertNDEFMessagesEqual(message, mockNFC.pushedMessage());
@@ -414,13 +410,6 @@ recordType is undefined and NDEFRecordInit.record's data is not DOMString.");
nfc_test(async (t, mockNFC) => {
const writer = new NDEFWriter();
- await writer.push({ records: [{ recordType: "text", data: test_text_data }] });
- assertNDEFMessagesEqual(test_text_data, mockNFC.pushedMessage());
-}, "Test that mediaType should be set to 'text/plain' if NDEFRecordInit.record's \
-recordType is 'text' and NDEFRecordInit.record's mediaType is undefined.");
-
-nfc_test(async (t, mockNFC) => {
- const writer = new NDEFWriter();
await writer.push({ records: [{ recordType: "mime", data: test_buffer_data }] });
assertNDEFMessagesEqual(test_buffer_data, mockNFC.pushedMessage());
}, "Test that mediaType should be set to 'application/octet-stream' if \
@@ -429,16 +418,6 @@ mediaType is undefined.");
nfc_test(async (t, mockNFC) => {
const writer = new NDEFWriter();
- await writer.push({ records: [{ recordType: "w3.org:xyz", data: test_buffer_data }] });
- const message = createMessage([createRecord('w3.org:xyz', 'application/octet-stream',
- test_buffer_data)]);
- assertNDEFMessagesEqual(message, mockNFC.pushedMessage());
-}, "Test that mediaType should be set to 'application/octet-stream' if \
-NDEFRecordInit.record's recordType is external type and NDEFRecordInit.record's \
-mediaType is undefined.");
-
-nfc_test(async (t, mockNFC) => {
- const writer = new NDEFWriter();
mockNFC.setIsNDEFTech(false);
await promise_rejects(t, 'NotSupportedError', writer.push(test_text_data));
}, "NDEFWriter.push should fail when the NFC device does not expose \
diff --git a/tests/wpt/web-platform-tests/web-nfc/idlharness.https.window.js b/tests/wpt/web-platform-tests/web-nfc/idlharness.https.window.js
index f59ad9b512e..74ffc21b220 100644
--- a/tests/wpt/web-platform-tests/web-nfc/idlharness.https.window.js
+++ b/tests/wpt/web-platform-tests/web-nfc/idlharness.https.window.js
@@ -7,7 +7,6 @@
const record = {
recordType: "text",
- mediaType: "text/plain",
data: "Hello World",
id: "/custom/path"
};
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 bdd8290d9eb..f90a050c4ca 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
@@ -84,7 +84,7 @@ function createMessage(records) {
}
}
-function createRecord(recordType, mediaType, data, encoding, lang) {
+function createRecord(recordType, data, mediaType, encoding, lang) {
let record = {};
if (recordType !== undefined)
record.recordType = recordType;
@@ -100,28 +100,28 @@ function createRecord(recordType, mediaType, data, encoding, lang) {
}
function createTextRecord(data, encoding, lang) {
- return createRecord('text', 'text/plain', data, encoding, lang);
+ return createRecord('text', data, undefined, encoding, lang);
}
function createMimeRecordFromJson(json) {
return createRecord(
- 'mime', 'application/json',
- new TextEncoder('utf-8').encode(JSON.stringify(json)));
+ 'mime', new TextEncoder('utf-8').encode(JSON.stringify(json)),
+ 'application/json');
}
function createMimeRecord(buffer) {
- return createRecord('mime', 'application/octet-stream', buffer);
+ return createRecord('mime', buffer, 'application/octet-stream');
}
function createUnknownRecord(buffer) {
- return createRecord('unknown', '', buffer);
+ return createRecord('unknown', buffer);
}
function createUrlRecord(url, isAbsUrl) {
if (isAbsUrl) {
- return createRecord('absolute-url', 'text/plain', url);
+ return createRecord('absolute-url', url);
}
- return createRecord('url', 'text/plain', url);
+ return createRecord('url', url);
}
function createNDEFPushOptions(target, timeout, ignoreRead) {