Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update XHR send to use XMLHttpRequestBodyInit #26794

Merged
merged 2 commits into from Jun 9, 2020
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

xhr: update test-suite to reflect use of XMLHttpRequestBodyInit

  • Loading branch information
gterzian committed Jun 9, 2020
commit a97d2e3b9b3f4754f2d36648220bb6bc621fe0e7
]
],
"send-data-es-object.any.js": [
"c6fe5de260c212013052f66636b92fb07aa82373",
"92286bca6dd00b82b78de39fcf7988ba1c424d07",
[
"xhr/send-data-es-object.any.html",
{
}
]
],
"send-data-readablestream.any.js": [

This comment has been minimized.

Copy link
@jdm

jdm Jun 8, 2020

Member

We should ensure there is a test that verifies the behaviour of xhr send when a ReadableStream argument is passed. This will make it clear on wpt.fyi if browsers have actually converged on the spec in the future.

"c53b1071828f95669d41a967c51bd352b389bebb",
[
"xhr/send-data-readablestream.any.html",
{
"script_metadata": [
[
"global",
"window,dedicatedworker,sharedworker"
]
]
}
],
[
"xhr/send-data-readablestream.any.sharedworker.html",
{
"script_metadata": [
[
"global",
"window,dedicatedworker,sharedworker"
]
]
}
],
[
"xhr/send-data-readablestream.any.worker.html",
{
"script_metadata": [
[
"global",
"window,dedicatedworker,sharedworker"
]
]
}
]
],
"send-data-sharedarraybuffer.any.js": [
"912f622697d538edbbc038f7ec76c2e63ee6ffa0",
[
]
],
"setrequestheader-content-type.htm": [
"8608c5967d6b29ba4f9d09ae7bf395a6b26876c2",
"07238391eb5cc8639edbe996208a18b6d9d26b04",
[
null,
{
@@ -27,6 +27,7 @@ function do_test(obj, expected, name) {
do_test({}, '[object Object]', 'sending a plain empty object')
do_test(Math, '[object Math]', 'sending the ES Math object')
do_test(new XMLHttpRequest, '[object XMLHttpRequest]', 'sending a new XHR instance')
do_test(new ReadableStream, '[object ReadableStream]', 'sending a new ReadableStream instance')
do_test({toString:function(){}}, 'undefined', 'sending object that stringifies to undefined')
do_test({toString:function(){return null}}, 'null', 'sending object that stringifies to null')
var ancestor = {toString: function(){

This file was deleted.

@@ -215,24 +215,6 @@
// https://fetch.spec.whatwg.org/#bodyinit, so the user's must be changed to match it
// as per https://xhr.spec.whatwg.org/#the-send%28%29-method step 4.
)
request(
function _ReadableStream() { return new ReadableStream() },
{"Content-Type": ""},
"",
'ReadableStream request respects setRequestHeader("")'
)
request(
function _ReadableStream() { return new ReadableStream() },
{},
undefined,
"ReadableStream request with under type sends no Content-Type without setRequestHeader() call"
)
request(
function _ReadableStream() { return new ReadableStream() },
{"Content-Type": "application/xml;charset=ASCII"},
"application/xml;charset=ASCII",
"ReadableStream request keeps setRequestHeader() Content-Type and charset"
)
</script>
</body>
</html>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.