Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js |
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js |
index 2cd7eb1778af31182bc4e00dcd57a503a103cf9c..dc3679092e7fed6ab7ca8a2c6ba1fec655fa2ede 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js |
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js |
@@ -11,6 +11,13 @@ onfetch = function(e) { |
append_header_error = error.name; |
} |
+ var request_construct_error = ''; |
+ try { |
+ new Request(e.request, {method: 'GET'}); |
+ } catch (error) { |
+ request_construct_error = error.name; |
+ } |
+ |
e.respondWith(new Response(JSON.stringify({ |
url: e.request.url, |
method: e.request.method, |
@@ -19,6 +26,7 @@ onfetch = function(e) { |
mode: e.request.mode, |
credentials: e.request.credentials, |
redirect: e.request.redirect, |
- append_header_error: append_header_error |
+ append_header_error: append_header_error, |
+ request_construct_error: request_construct_error |
}))); |
}; |