| Index: LayoutTests/http/tests/navigation/resources/check-ping.php
|
| diff --git a/LayoutTests/http/tests/navigation/resources/check-ping.php b/LayoutTests/http/tests/navigation/resources/check-ping.php
|
| index d1e669b243fb7b9c56d5c54c15e21c220189aa4f..7d384983e5c0fe6eabea497ba736f9be2924b718 100644
|
| --- a/LayoutTests/http/tests/navigation/resources/check-ping.php
|
| +++ b/LayoutTests/http/tests/navigation/resources/check-ping.php
|
| @@ -1,19 +1,26 @@
|
| <?php
|
| -while (!file_exists("ping.txt")) {
|
| +require_once '../../resources/portabilityLayer.php';
|
| +
|
| +$pingFilename = sys_get_temp_dir() . "/ping.txt";
|
| +while (!file_exists($pingFilename)) {
|
| usleep(10000);
|
| // file_exists() caches results, we want to invalidate the cache.
|
| clearstatcache();
|
| }
|
|
|
| echo "<html><body>\n";
|
| -echo "Ping sent successfully";
|
| -$pingFile = fopen("ping.txt", 'r');
|
| -while ($line = fgets($pingFile)) {
|
| - echo "<br>";
|
| - echo trim($line);
|
| +$pingFile = fopen($pingFilename, 'r');
|
| +if ($pingFile) {
|
| + echo "Ping sent successfully";
|
| + while ($line = fgets($pingFile)) {
|
| + echo "<br>";
|
| + echo trim($line);
|
| + }
|
| + fclose($pingFile);
|
| + unlink($pingFilename);
|
| +} else {
|
| + echo "Ping not sent";
|
| }
|
| -fclose($pingFile);
|
| -unlink("ping.txt");
|
| echo "<script>";
|
| echo "if (window.testRunner)";
|
| echo " testRunner.notifyDone();";
|
|
|