Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/respond-with-body.js

Issue 1847383003: CREDENTIAL: Rework the integration with Fetch (2/2) Base URL: https://chromium.googlesource.com/chromium/src.git@pass-serialized
Patch Set: unittest Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 self.addEventListener('fetch', e => {
2 if (new URL(e.request.url).search != '?respond-with-body') {
3 return;
4 }
5 e.respondWith(new Promise(r => {
6 e.request.text().then(t => {
7 var data = {
8 'credentials': e.request.credentials,
9 'body': t
10 };
11 r(new Response(JSON.stringify(data)));
12 })
13 }));
14 });
15
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698