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

Make streaming upload work with network fallback on service worker #27756

Merged
merged 1 commit into from Feb 25, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions service-workers/service-worker/fetch-event.https.html
Expand Up @@ -501,7 +501,7 @@
const echo_url = '/fetch/api/resources/echo-content.py?ignore';
const response = await frame.contentWindow.fetch(echo_url, {
method: 'POST',
body: rs
body: rs.pipeThrough(new TextEncoderStream())
});
const text = await response.text();
assert_equals(text,
Expand Down Expand Up @@ -550,9 +550,10 @@
const frame = await with_iframe(page_url);
t.add_cleanup(() => { frame.remove(); });
const echo_url = '/fetch/api/resources/echo-content.py?use-and-ignore';
await promise_rejects_js(t, TypeError, frame.contentWindow.fetch(echo_url, {
const w = frame.contentWindow;
await promise_rejects_js(t, w.TypeError, w.fetch(echo_url, {
method: 'POST',
body: rs
body: rs.pipeThrough(new TextEncoderStream())
}));
}, 'FetchEvent#body is a ReadableStream, used and passed to network fallback');

Expand Down