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

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

Issue 286063003: Save ping+beacon test status in temporary directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 while (!file_exists("ping.txt")) { 2 require_once '../../resources/portabilityLayer.php';
3
4 $pingFilename = sys_get_temp_dir() . "/ping.txt";
5 while (!file_exists($pingFilename)) {
3 usleep(10000); 6 usleep(10000);
4 // file_exists() caches results, we want to invalidate the cache. 7 // file_exists() caches results, we want to invalidate the cache.
5 clearstatcache(); 8 clearstatcache();
6 } 9 }
7 10
8 echo "<html><body>\n"; 11 echo "<html><body>\n";
9 echo "Ping sent successfully"; 12 $pingFile = fopen($pingFilename, 'r');
10 $pingFile = fopen("ping.txt", 'r'); 13 if ($pingFile) {
11 while ($line = fgets($pingFile)) { 14 echo "Ping sent successfully";
12 echo "<br>"; 15 while ($line = fgets($pingFile)) {
13 echo trim($line); 16 echo "<br>";
17 echo trim($line);
18 }
19 fclose($pingFile);
20 unlink($pingFilename);
21 } else {
22 echo "Ping not sent";
14 } 23 }
15 fclose($pingFile);
16 unlink("ping.txt");
17 echo "<script>"; 24 echo "<script>";
18 echo "if (window.testRunner)"; 25 echo "if (window.testRunner)";
19 echo " testRunner.notifyDone();"; 26 echo " testRunner.notifyDone();";
20 echo "</script>"; 27 echo "</script>";
21 echo "</body></html>"; 28 echo "</body></html>";
22 ?> 29 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698