summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 23:37:50 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-24 23:37:50 +0000
commit7a6db4024aa668fd49741c4c34965ab674efaac6 (patch)
tree291de61ee2f86da940a5c9c0a67a79d394478a8e /webkit/tools/test_shell
parente8b3ddfde11a59bc910697090906dd36f0426401 (diff)
downloadchromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.zip
chromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.tar.gz
chromium_src-7a6db4024aa668fd49741c4c34965ab674efaac6.tar.bz2
Support sending a sliced file in chromium.
BUG=none TEST=The WebKit Layout test. Review URL: http://codereview.chromium.org/594036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42559 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc10
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h9
2 files changed, 16 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 7aac167..baf8355 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -515,12 +515,16 @@ class ResourceLoaderBridgeImpl : public ResourceLoaderBridge {
params_->upload->AppendBytes(data, data_len);
}
- virtual void AppendFileRangeToUpload(const FilePath& file_path,
- uint64 offset, uint64 length) {
+ virtual void AppendFileRangeToUpload(
+ const FilePath& file_path,
+ uint64 offset,
+ uint64 length,
+ const base::Time& expected_modification_time) {
DCHECK(params_.get());
if (!params_->upload)
params_->upload = new net::UploadData();
- params_->upload->AppendFileRange(file_path, offset, length);
+ params_->upload->AppendFileRange(file_path, offset, length,
+ expected_modification_time);
}
virtual void SetUploadIdentifier(int64 identifier) {
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index c182269..f2f314e 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -152,6 +152,15 @@ class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
reinterpret_cast<int64*>(&result));
}
+ virtual bool getFileModificationTime(const WebKit::WebString& path,
+ double& result) {
+ file_util::FileInfo info;
+ if (!file_util::GetFileInfo(webkit_glue::WebStringToFilePath(path), &info))
+ return false;
+ result = info.last_modified.ToDoubleT();
+ return true;
+ }
+
virtual unsigned long long visitedLinkHash(const char* canonicalURL,
size_t length) {
return 0;