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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/resources/network-simulator.php

Issue 1793933002: Don't trigger a link resource fetch on media change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test and made mediaChanged() virtual Created 4 years, 9 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 require_once 'portabilityLayer.php'; 2 require_once 'portabilityLayer.php';
3 3
4 // This script acts as a stateful proxy for retrieving files. When the state is set to 4 // This script acts as a stateful proxy for retrieving files. When the state is set to
5 // offline, it simulates a network error with a nonsense response. 5 // offline, it simulates a network error with a nonsense response.
6 6
7 if (!sys_get_temp_dir()) { 7 if (!sys_get_temp_dir()) {
8 echo "FAIL: No temp dir was returned.\n"; 8 echo "FAIL: No temp dir was returned.\n";
9 exit(); 9 exit();
10 } 10 }
(...skipping 26 matching lines...) Expand all
37 if (preg_match("/\.svg$/", $path)) 37 if (preg_match("/\.svg$/", $path))
38 return "application/svg+xml"; 38 return "application/svg+xml";
39 if (preg_match("/\.xsl$/", $path)) 39 if (preg_match("/\.xsl$/", $path))
40 return "application/xslt+xml"; 40 return "application/xslt+xml";
41 if (preg_match("/\.gif$/", $path)) 41 if (preg_match("/\.gif$/", $path))
42 return "image/gif"; 42 return "image/gif";
43 if (preg_match("/\.jpg$/", $path)) 43 if (preg_match("/\.jpg$/", $path))
44 return "image/jpeg"; 44 return "image/jpeg";
45 if (preg_match("/\.png$/", $path)) 45 if (preg_match("/\.png$/", $path))
46 return "image/png"; 46 return "image/png";
47 if (preg_match("/\.css$/", $path))
48 return "text/css";
47 return "text/plain"; 49 return "text/plain";
48 } 50 }
49 51
50 function generateNoCacheHTTPHeader() 52 function generateNoCacheHTTPHeader()
51 { 53 {
52 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT"); 54 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
53 header("Cache-Control: no-cache, no-store, must-revalidate"); 55 header("Cache-Control: no-cache, no-store, must-revalidate");
54 header("Pragma: no-cache"); 56 header("Pragma: no-cache");
55 } 57 }
56 58
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 else if ($command == "log-resource-request") 178 else if ($command == "log-resource-request")
177 handleLogResourceRequest($_GET['path']); 179 handleLogResourceRequest($_GET['path']);
178 else 180 else
179 echo "Unknown command: " . $command . "\n"; 181 echo "Unknown command: " . $command . "\n";
180 exit(); 182 exit();
181 } 183 }
182 184
183 $requestedPath = $_GET['path']; 185 $requestedPath = $_GET['path'];
184 generateResponse($requestedPath); 186 generateResponse($requestedPath);
185 ?> 187 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698