diff options
author | annacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 18:46:38 +0000 |
---|---|---|
committer | annacc@chromium.org <annacc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-17 18:46:38 +0000 |
commit | 6e89290d7d706c0adedaf01713425094d4096526 (patch) | |
tree | 82612f318887b69f4eec4986b686f426021e72dd /webkit/mocks/mock_resource_loader_bridge.h | |
parent | 45568795e2a04e29cefdaad058f55563a98cd970 (diff) | |
download | chromium_src-6e89290d7d706c0adedaf01713425094d4096526.zip chromium_src-6e89290d7d706c0adedaf01713425094d4096526.tar.gz chromium_src-6e89290d7d706c0adedaf01713425094d4096526.tar.bz2 |
moving mocks into webkit/mocks/
The number of mock_... files in webkit/glue is piling up and it makes more sense for them to live in a brand new mocks/ directory.
BUG=None.
TEST=Compiles.
Review URL: http://codereview.chromium.org/5878006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69562 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/mocks/mock_resource_loader_bridge.h')
-rw-r--r-- | webkit/mocks/mock_resource_loader_bridge.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/webkit/mocks/mock_resource_loader_bridge.h b/webkit/mocks/mock_resource_loader_bridge.h new file mode 100644 index 0000000..5be7d89 --- /dev/null +++ b/webkit/mocks/mock_resource_loader_bridge.h @@ -0,0 +1,44 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef WEBKIT_MOCKS_MOCK_RESOURCE_LOADER_BRIDGE_H_ +#define WEBKIT_MOCKS_MOCK_RESOURCE_LOADER_BRIDGE_H_ + +#include "testing/gmock/include/gmock/gmock.h" +#include "webkit/glue/resource_loader_bridge.h" + +class FilePath; + +namespace webkit_glue { + +class MockResourceLoaderBridge : public webkit_glue::ResourceLoaderBridge { + public: + MockResourceLoaderBridge() { + } + + virtual ~MockResourceLoaderBridge() { + OnDestroy(); + } + + MOCK_METHOD2(AppendDataToUpload, void(const char* data, int data_len)); + MOCK_METHOD4(AppendFileRangeToUpload, + void(const FilePath& file_path, + uint64 offset, + uint64 length, + const base::Time& expected_modification_time)); + MOCK_METHOD1(AppendBlobToUpload, void(const GURL& blob_url)); + MOCK_METHOD1(SetUploadIdentifier, void(int64 identifier)); + MOCK_METHOD1(Start, bool(ResourceLoaderBridge::Peer* peer)); + MOCK_METHOD0(Cancel, void()); + MOCK_METHOD1(SetDefersLoading, void(bool value)); + MOCK_METHOD1(SyncLoad, void(SyncLoadResponse* response)); + MOCK_METHOD0(OnDestroy, void()); + + private: + DISALLOW_COPY_AND_ASSIGN(MockResourceLoaderBridge); +}; + +} // namespace webkit_glue + +#endif // WEBKIT_MOCKS_MOCK_RESOURCE_LOADER_BRIDGE_H_ |