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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Initialise encoded_body_length for sync XHR to data: URLs Created 4 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: third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
new file mode 100644
index 0000000000000000000000000000000000000000..009aa1a8ff3ba38e19bd2d2b7d7cb6abf499b6f7
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cors-preflight.php
@@ -0,0 +1,21 @@
+<?php
+header("Access-Control-Allow-Origin: *");
+header("Access-Control-Max-Age: 0");
+header("Timing-Allow-Origin: *");
+
+if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
+ header("Access-Control-Allow-Headers: X-Require-Preflight");
+ ob_start();
+}
+?>
+<!DOCTYPE html>
+<title>CORS preflight test</title>
+If this script is accessed with the header X-Require-Preflight then the
+browser will send a preflight request. Otherwise it won't.
+
+<?php
+if ($_SERVER["REQUEST_METHOD"] == "OPTIONS") {
+ # Discard the body.
+ ob_end_clean();
+}
+?>

Powered by Google App Engine
This is Rietveld 408576698