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

Unified Diff: LayoutTests/http/tests/navigation/resources/save-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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/navigation/resources/save-Ping.php
diff --git a/LayoutTests/http/tests/navigation/resources/save-Ping.php b/LayoutTests/http/tests/navigation/resources/save-Ping.php
index 0e9c2fb5dd0e4d1156cb29721d6c44990d1340b8..d818de93f9195ec7309653df38d685487dde8212 100644
--- a/LayoutTests/http/tests/navigation/resources/save-Ping.php
+++ b/LayoutTests/http/tests/navigation/resources/save-Ping.php
@@ -1,5 +1,7 @@
<?php
-$pingFile = fopen("ping.txt.tmp", 'w');
+require_once '../../resources/portabilityLayer.php';
+
+$pingFile = fopen(sys_get_temp_dir() . "/ping.txt.tmp", 'w');
$httpHeaders = $_SERVER;
ksort($httpHeaders, SORT_STRING);
foreach ($httpHeaders as $name => $value) {
@@ -7,7 +9,7 @@ foreach ($httpHeaders as $name => $value) {
fwrite($pingFile, "$name: $value\n");
}
fclose($pingFile);
-rename("ping.txt.tmp", "ping.txt");
+rename(sys_get_temp_dir() . "/ping.txt.tmp", sys_get_temp_dir() . "/ping.txt");
foreach ($_COOKIE as $name => $value)
setcookie($name, "deleted", time() - 60, "/");
?>

Powered by Google App Engine
This is Rietveld 408576698