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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/sendbeacon/resources/save-beacon.php

Issue 2702113003: Move tests for sendBeacon to a separate dedicated directory for clearer ownership (Closed)
Patch Set: a Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 <?php 1 <?php
2 require_once '../../resources/portabilityLayer.php'; 2 require_once '../../resources/portabilityLayer.php';
3 3
4 function prettify($name) { 4 function prettify($name) {
5 return str_replace(' ', '-', ucwords(str_replace('_', ' ', str_replace('http_ ', '', strtolower($name))))); 5 return str_replace(' ', '-', ucwords(str_replace('_', ' ', str_replace('http_ ', '', strtolower($name)))));
6 } 6 }
7 7
8 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $ _REQUEST['name'] : "") . ".txt"; 8 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $ _REQUEST['name'] : "") . ".txt";
9 $beaconFile = fopen($beaconFilename . ".tmp", 'w'); 9 $beaconFile = fopen($beaconFilename . ".tmp", 'w');
10 $httpHeaders = $_SERVER; 10 $httpHeaders = $_SERVER;
(...skipping 20 matching lines...) Expand all
31 31
32 fwrite($beaconFile, "Body: $postdata\n"); 32 fwrite($beaconFile, "Body: $postdata\n");
33 fclose($beaconFile); 33 fclose($beaconFile);
34 rename($beaconFilename . ".tmp", $beaconFilename); 34 rename($beaconFilename . ".tmp", $beaconFilename);
35 35
36 if (!array_key_exists('dontclearcookies', $_GET)) { 36 if (!array_key_exists('dontclearcookies', $_GET)) {
37 foreach ($_COOKIE as $name => $value) 37 foreach ($_COOKIE as $name => $value)
38 setcookie($name, "deleted", time() - 60, "/"); 38 setcookie($name, "deleted", time() - 60, "/");
39 } 39 }
40 ?> 40 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698