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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js

Issue 1391583002: Introduce "navigate" mode in Requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
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
})));
};

Powered by Google App Engine
This is Rietveld 408576698