| Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/respond-with-body.js
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/respond-with-body.js b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/respond-with-body.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aca09eda2e4729992754de91cdb1772b9c097382
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/respond-with-body.js
|
| @@ -0,0 +1,15 @@
|
| +self.addEventListener('fetch', e => {
|
| + if (new URL(e.request.url).search != '?respond-with-body') {
|
| + return;
|
| + }
|
| + e.respondWith(new Promise(r => {
|
| + e.request.text().then(t => {
|
| + var data = {
|
| + 'credentials': e.request.credentials,
|
| + 'body': t
|
| + };
|
| + r(new Response(JSON.stringify(data)));
|
| + })
|
| + }));
|
| +});
|
| +
|
|
|