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

Unified Diff: LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php

Issue 416353002: [ServiceWorker] Add test for cookies of fetch() in ServiceWorker (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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: LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
diff --git a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
index ea70d086957da1bd20ddfb210206b0a88e43eb26..7567b255f1b17b78b2e0394b55563d7f7388f804 100644
--- a/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
+++ b/LayoutTests/http/tests/serviceworker/resources/fetch-access-control.php
@@ -24,19 +24,24 @@ if ((isset($_GET['Auth']) and !isset($_SERVER['PHP_AUTH_USER'])) || isset($_GET[
$username = 'undefined';
$password = 'undefined';
+$cookie = 'undefined';
if (isset($_SERVER['PHP_AUTH_USER'])) {
$username = $_SERVER['PHP_AUTH_USER'];
}
if (isset($_SERVER['PHP_AUTH_PW'])) {
$password = $_SERVER['PHP_AUTH_PW'];
}
+if (isset($_COOKIE['cookie'])) {
+ $cookie = $_COOKIE['cookie'];
+}
header('Content-Type: application/json');
$arr = array('jsonpResult' => 'success',
'method' => $_SERVER['REQUEST_METHOD'],
'headers' => getallheaders(),
'username' => $username,
- 'password' => $password);
+ 'password' => $password,
+ 'cookie' => $cookie);
$json = json_encode($arr);
echo "report( $json );";
?>

Powered by Google App Engine
This is Rietveld 408576698