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

Unified Diff: content/test/data/service_worker/fetch_cross_origin.html

Issue 1859313002: Save-Data should not be added to CORS Access-Control-Request-Headers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: content/test/data/service_worker/fetch_cross_origin.html
diff --git a/content/test/data/service_worker/fetch_cross_origin.html b/content/test/data/service_worker/fetch_cross_origin.html
new file mode 100644
index 0000000000000000000000000000000000000000..baa0c285a587072d6a8486d15e0aa0e848cc6db8
--- /dev/null
+++ b/content/test/data/service_worker/fetch_cross_origin.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>INITIAL</title>
+<script>
+var queryString = location.search;
+
+if (queryString && queryString.charAt(0) === '?') {
+ // Fetches the URL provided in query string with a custom header.
+ fetch(queryString.substring(1),
+ {headers: {'X-Custom-Header': 'foo'}}).then(function(data) {
+ data.text().then(function(text) {
+ document.title = text;
+ });
falken 2016/04/06 04:41:36 nit: Service worker test code likes to chain promi
Raj 2016/04/06 05:08:42 Done. Nice.
+ }).catch(function() {
+ document.title = "FAIL";
falken 2016/04/06 04:41:36 Use single-quotes for consistency.
Raj 2016/04/06 05:08:42 Done.
+ });
+}
+</script>
+</head>
+</html>

Powered by Google App Engine
This is Rietveld 408576698