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

Side by Side Diff: webkit/glue/mock_resource_loader_bridge.h

Issue 3282003: Support handling blob URL and resolve blob references in upload data.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_ 5 #ifndef WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_
6 #define WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_ 6 #define WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_
7 7
8 #include "testing/gmock/include/gmock/gmock.h" 8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "webkit/glue/resource_loader_bridge.h" 9 #include "webkit/glue/resource_loader_bridge.h"
10 10
11 class FilePath; 11 class FilePath;
12 12
13 namespace webkit_glue { 13 namespace webkit_glue {
14 14
15 class MockResourceLoaderBridge : public webkit_glue::ResourceLoaderBridge { 15 class MockResourceLoaderBridge : public webkit_glue::ResourceLoaderBridge {
16 public: 16 public:
17 MockResourceLoaderBridge() { 17 MockResourceLoaderBridge() {
18 } 18 }
19 19
20 virtual ~MockResourceLoaderBridge() { 20 virtual ~MockResourceLoaderBridge() {
21 OnDestroy(); 21 OnDestroy();
22 } 22 }
23 23
24 MOCK_METHOD2(AppendDataToUpload, void(const char* data, int data_len)); 24 MOCK_METHOD2(AppendDataToUpload, void(const char* data, int data_len));
25 MOCK_METHOD4(AppendFileRangeToUpload, 25 MOCK_METHOD4(AppendFileRangeToUpload,
26 void(const FilePath& file_path, 26 void(const FilePath& file_path,
27 uint64 offset, 27 uint64 offset,
28 uint64 length, 28 uint64 length,
29 const base::Time& expected_modification_time)); 29 const base::Time& expected_modification_time));
30 MOCK_METHOD1(AppendBlobToUpload, void(const GURL& blob_url));
30 MOCK_METHOD1(SetUploadIdentifier, void(int64 identifier)); 31 MOCK_METHOD1(SetUploadIdentifier, void(int64 identifier));
31 MOCK_METHOD1(Start, bool(ResourceLoaderBridge::Peer* peer)); 32 MOCK_METHOD1(Start, bool(ResourceLoaderBridge::Peer* peer));
32 MOCK_METHOD0(Cancel, void()); 33 MOCK_METHOD0(Cancel, void());
33 MOCK_METHOD1(SetDefersLoading, void(bool value)); 34 MOCK_METHOD1(SetDefersLoading, void(bool value));
34 MOCK_METHOD1(SyncLoad, void(SyncLoadResponse* response)); 35 MOCK_METHOD1(SyncLoad, void(SyncLoadResponse* response));
35 MOCK_METHOD0(OnDestroy, void()); 36 MOCK_METHOD0(OnDestroy, void());
36 37
37 private: 38 private:
38 DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridge); 39 DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridge);
39 }; 40 };
40 41
41 } // namespace webkit_glue 42 } // namespace webkit_glue
42 43
43 #endif // WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_ 44 #endif // WEBKIT_GLUE_MOCK_RESOURCE_LOADER_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698