feat: migrate protocol module to NetworkService (Part 11) (#18706)

* Pipe data into HTTP protocol handlers

* Remove unused parameters

* Remove "sending request of http protocol urls" test

Sending request to "http://" in "file://" violates CORS rules and always
fail, before NetworkService somehow Chromium still sent a request even
though the request failed with CORS error, so the test passes while the
test is not valid. With NetworkService no request is sent at all and the
test jsut fails.

So this is an ancient invalid test, as sending http requests have been
fully covered in other tests, I am removing this test.
This commit is contained in:
Cheng Zhao 2019-06-11 14:07:58 +09:00 committed by GitHub
parent c6dc7d5b79
commit 3a1d6d2ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 190 additions and 34 deletions

View file

@ -86,20 +86,6 @@ describe('chromium feature', () => {
})
})
describe('sending request of http protocol urls', () => {
it('does not crash', (done) => {
const server = http.createServer((req, res) => {
res.end()
server.close()
done()
})
server.listen(0, '127.0.0.1', () => {
const port = server.address().port
$.get(`http://127.0.0.1:${port}`)
})
})
})
describe('accessing key names also used as Node.js module names', () => {
it('does not crash', (done) => {
w = new BrowserWindow({ show: false })