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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/sendbeacon/resources/check-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 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $ _REQUEST['name'] : "") . ".txt"; 4 $beaconFilename = sys_get_temp_dir() . "/beacon" . (isset($_REQUEST['name']) ? $ _REQUEST['name'] : "") . ".txt";
5 5
6 $max_attempts = 700; 6 $max_attempts = 700;
7 $retries = isset($_REQUEST['retries']) ? (int)$_REQUEST['retries'] : $max_attemp ts; 7 $retries = isset($_REQUEST['retries']) ? (int)$_REQUEST['retries'] : $max_attemp ts;
8 while (!file_exists($beaconFilename) && $retries != 0) { 8 while (!file_exists($beaconFilename) && $retries != 0) {
9 usleep(10000); 9 usleep(10000);
10 # file_exists() caches results, we want to invalidate the cache. 10 # file_exists() caches results, we want to invalidate the cache.
(...skipping 17 matching lines...) Expand all
28 } 28 }
29 fclose($beaconFile); 29 fclose($beaconFile);
30 unlink($beaconFilename); 30 unlink($beaconFilename);
31 } else { 31 } else {
32 echo "Beacon status not readable\n"; 32 echo "Beacon status not readable\n";
33 } 33 }
34 } else { 34 } else {
35 echo "Beacon not sent\n"; 35 echo "Beacon not sent\n";
36 } 36 }
37 ?> 37 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698