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

Unified Diff: webkit/support/weburl_loader_mock.h

Issue 23526028: Move source files from webkit/support to content/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/support/weburl_loader_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/weburl_loader_mock.h
diff --git a/webkit/support/weburl_loader_mock.h b/webkit/support/weburl_loader_mock.h
deleted file mode 100644
index 46de7be0918573da6ae5179f55230323e442af4b..0000000000000000000000000000000000000000
--- a/webkit/support/weburl_loader_mock.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2011 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_SUPPORT_WEBURL_LOADER_MOCK_H_
-#define WEBKIT_SUPPORT_WEBURL_LOADER_MOCK_H_
-
-#include "base/basictypes.h"
-#include "base/memory/scoped_ptr.h"
-#include "third_party/WebKit/public/platform/WebURLLoader.h"
-
-namespace WebKit {
-class WebData;
-struct WebURLError;
-class WebURLLoaderClient;
-class WebURLRequest;
-class WebURLResponse;
-}
-
-class WebURLLoaderMockFactory;
-
-// A simple class for mocking WebURLLoader.
-// If the WebURLLoaderMockFactory it is associated with has been configured to
-// mock the request it gets, it serves the mocked resource. Otherwise it just
-// forwards it to the default loader.
-class WebURLLoaderMock : public WebKit::WebURLLoader {
- public:
- // This object becomes the owner of |default_loader|.
- WebURLLoaderMock(WebURLLoaderMockFactory* factory,
- WebKit::WebURLLoader* default_loader);
- virtual ~WebURLLoaderMock();
-
- // Simulates the asynchronous request being served.
- void ServeAsynchronousRequest(const WebKit::WebURLResponse& response,
- const WebKit::WebData& data,
- const WebKit::WebURLError& error);
-
- // Simulates the redirect being served.
- WebKit::WebURLRequest ServeRedirect(
- const WebKit::WebURLResponse& redirectResponse);
-
- // WebURLLoader methods:
- virtual void loadSynchronously(const WebKit::WebURLRequest& request,
- WebKit::WebURLResponse& response,
- WebKit::WebURLError& error,
- WebKit::WebData& data);
- virtual void loadAsynchronously(const WebKit::WebURLRequest& request,
- WebKit::WebURLLoaderClient* client);
- virtual void cancel();
- virtual void setDefersLoading(bool defer);
-
- bool isDeferred() { return is_deferred_; }
-
- private:
- WebURLLoaderMockFactory* factory_;
- WebKit::WebURLLoaderClient* client_;
- scoped_ptr<WebKit::WebURLLoader> default_loader_;
- bool using_default_loader_;
- bool is_deferred_;
-
- DISALLOW_COPY_AND_ASSIGN(WebURLLoaderMock);
-};
-
-#endif // WEBKIT_SUPPORT_WEBURL_LOADER_MOCK_H_
« no previous file with comments | « webkit/support/webkit_support_glue.cc ('k') | webkit/support/weburl_loader_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698