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

Side by Side Diff: LayoutTests/http/tests/navigation/resources/check-beacon.php

Issue 232053005: Implement navigator.sendBeacon() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adjust unrelated test expectation Created 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 <?php
2 $beaconFilename = "beacon" . (isset($_REQUEST['name']) ? $_REQUEST['name'] : "") . ".txt";
3 while (!file_exists($beaconFilename)) {
4 usleep(10000);
5 // file_exists() caches results, we want to invalidate the cache.
6 clearstatcache();
7 }
8
9 header('Content-Type: text/plain');
10 echo "Beacon sent successfully\n";
11 $beaconFile = fopen($beaconFilename, 'r');
12 while ($line = fgets($beaconFile)) {
13 $trimmed = trim($line);
14 if ($trimmed != "")
15 echo "$trimmed\n";
16 }
17 fclose($beaconFile);
18 unlink($beaconFilename);
19 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698