diff options
author | Kristian Monsen <kristianm@google.com> | 2010-09-08 12:18:00 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-09-11 12:08:58 +0100 |
commit | 5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch) | |
tree | 775803c4ab35af50aa5f5472cd1fb95fe9d5152d /LayoutTests/http | |
parent | 3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff) | |
download | external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2 |
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'LayoutTests/http')
-rw-r--r-- | LayoutTests/http/tests/resources/network-simulator.php | 40 | ||||
-rw-r--r-- | LayoutTests/http/tests/resources/silence.mpg | bin | 33227 -> 0 bytes | |||
-rw-r--r-- | LayoutTests/http/tests/resources/test.mp4 | bin | 0 -> 192844 bytes | |||
-rw-r--r-- | LayoutTests/http/tests/resources/test.ogv | bin | 0 -> 103746 bytes |
4 files changed, 40 insertions, 0 deletions
diff --git a/LayoutTests/http/tests/resources/network-simulator.php b/LayoutTests/http/tests/resources/network-simulator.php index 3f1201f..4860028 100644 --- a/LayoutTests/http/tests/resources/network-simulator.php +++ b/LayoutTests/http/tests/resources/network-simulator.php @@ -120,6 +120,38 @@ function handleGetResourceCountCommand($path) } } +function handleStartResourceRequestsLog() +{ + $resourceLogFile = sys_get_temp_dir() . "/resource-log"; + file_put_contents($resourceLogFile, ""); +} + +function handleClearResourceRequestsLog() +{ + $resourceLogFile = sys_get_temp_dir() . "/resource-log"; + file_put_contents($resourceLogFile, ""); +} + +function handleGetResourceRequestsLog() +{ + $resourceLogFile = sys_get_temp_dir() . "/resource-log"; + + generateNoCacheHTTPHeader(); + header("Content-Type: text/plain"); + + print file_get_contents($resourceLogFile); +} + +function handleLogResourceRequest($path) +{ + $resourceLogFile = sys_get_temp_dir() . "/resource-log"; + + $newData = "\n".$path; + // Documentation says that appends are atomic. + file_put_contents($resourceLogFile, $newData, FILE_APPEND); + generateResponse($path); +} + $stateFile = sys_get_temp_dir() . "/network-simulator-state"; $command = $_GET['command']; if ($command) { @@ -133,6 +165,14 @@ if ($command) { handleResetResourceCountCommand(); else if ($command == "get-resource-count") handleGetResourceCountCommand($_GET['path']); + else if ($command == "start-resource-request-log") + handleStartResourceRequestsLog(); + else if ($command == "clear-resource-request-log") + handleClearResourceRequestsLog(); + else if ($command == "get-resource-request-log") + handleGetResourceRequestsLog(); + else if ($command == "log-resource-request") + handleLogResourceRequest($_GET['path']); else echo "Unknown command: " . $command . "\n"; exit(); diff --git a/LayoutTests/http/tests/resources/silence.mpg b/LayoutTests/http/tests/resources/silence.mpg Binary files differdeleted file mode 100644 index b6bbf20..0000000 --- a/LayoutTests/http/tests/resources/silence.mpg +++ /dev/null diff --git a/LayoutTests/http/tests/resources/test.mp4 b/LayoutTests/http/tests/resources/test.mp4 Binary files differnew file mode 100644 index 0000000..d278c8a --- /dev/null +++ b/LayoutTests/http/tests/resources/test.mp4 diff --git a/LayoutTests/http/tests/resources/test.ogv b/LayoutTests/http/tests/resources/test.ogv Binary files differnew file mode 100644 index 0000000..c9ee910 --- /dev/null +++ b/LayoutTests/http/tests/resources/test.ogv |