Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / resources / reset-temp-file.php
blob186376b544427b90d49d0a6100f1dc35c787d3b3
1 <?php
2 require_once 'portabilityLayer.php';
4 if (!sys_get_temp_dir()) {
5 echo "FAIL: No temp dir was returned.\n";
6 exit();
9 $tmpFile = sys_get_temp_dir() . "/" . $_GET['filename'];
11 if (!file_put_contents($tmpFile, "test")) {
12 echo "FAIL: unable to write to file: " . $tmpFile . "\n";
13 exit();
15 if (!unlink($tmpFile)) {
16 echo "FAIL: Unable to delete file: " . $tmpFile . "\n";
17 exit();