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

Unified Diff: content/browser/renderer_host/render_view_host_unittest.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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
Index: content/browser/renderer_host/render_view_host_unittest.cc
diff --git a/content/browser/renderer_host/render_view_host_unittest.cc b/content/browser/renderer_host/render_view_host_unittest.cc
index f523c064edd676ed53164bed804d74a691125df4..7c5898e8e3197dcb4a09bbe03df807f4bd079355 100644
--- a/content/browser/renderer_host/render_view_host_unittest.cc
+++ b/content/browser/renderer_host/render_view_host_unittest.cc
@@ -12,7 +12,9 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/page_transition_types.h"
+#include "content/public/common/url_constants.h"
#include "content/public/test/mock_render_process_host.h"
+#include "content/test/test_content_browser_client.h"
#include "content/test/test_web_contents.h"
#include "net/base/net_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
@@ -20,7 +22,39 @@
namespace content {
+class RenderViewHostTestBrowserClient : public TestContentBrowserClient {
+ public:
+ RenderViewHostTestBrowserClient() {}
+ virtual ~RenderViewHostTestBrowserClient() {}
+
+ virtual bool IsHandledURL(const GURL& url) OVERRIDE {
+ return url.scheme() == chrome::kFileScheme;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestBrowserClient);
+};
+
class RenderViewHostTest : public RenderViewHostImplTestHarness {
+ public:
+ RenderViewHostTest() : old_browser_client_(NULL) {}
+ virtual ~RenderViewHostTest() {}
+
+ virtual void SetUp() OVERRIDE {
+ RenderViewHostImplTestHarness::SetUp();
+ old_browser_client_ = SetBrowserClientForTesting(&test_browser_client_);
+ }
+
+ virtual void TearDown() OVERRIDE {
+ SetBrowserClientForTesting(old_browser_client_);
+ RenderViewHostImplTestHarness::TearDown();
+ }
+
+ private:
+ RenderViewHostTestBrowserClient test_browser_client_;
+ ContentBrowserClient* old_browser_client_;
+
+ DISALLOW_COPY_AND_ASSIGN(RenderViewHostTest);
};
// All about URLs reported by the renderer should get rewritten to about:blank.
« no previous file with comments | « content/browser/child_process_security_policy_unittest.cc ('k') | content/browser/webui/url_data_manager_backend.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698