| Index: content/renderer/render_view_browsertest.cc
|
| ===================================================================
|
| --- content/renderer/render_view_browsertest.cc (revision 175970)
|
| +++ content/renderer/render_view_browsertest.cc (working copy)
|
| @@ -96,11 +96,11 @@
|
| }
|
| virtual bool UseWebUIForURL(BrowserContext* browser_context,
|
| const GURL& url) const OVERRIDE {
|
| - return GetContentClient()->HasWebUIScheme(url);
|
| + return HasWebUIScheme(url);
|
| }
|
| virtual bool UseWebUIBindingsForURL(BrowserContext* browser_context,
|
| const GURL& url) const OVERRIDE {
|
| - return GetContentClient()->HasWebUIScheme(url);
|
| + return HasWebUIScheme(url);
|
| }
|
| virtual bool IsURLAcceptableForWebUI(
|
| BrowserContext* browser_context,
|
| @@ -110,28 +110,6 @@
|
| }
|
| };
|
|
|
| -class WebUITestClient : public ShellContentClient {
|
| - public:
|
| - WebUITestClient() {
|
| - }
|
| -
|
| - virtual bool HasWebUIScheme(const GURL& url) const OVERRIDE {
|
| - return url.SchemeIs(chrome::kChromeUIScheme);
|
| - }
|
| -};
|
| -
|
| -class WebUITestBrowserClient : public ShellContentBrowserClient {
|
| - public:
|
| - WebUITestBrowserClient() {}
|
| -
|
| - virtual WebUIControllerFactory* GetWebUIControllerFactory() OVERRIDE {
|
| - return &factory_;
|
| - }
|
| -
|
| - private:
|
| - WebUITestWebUIControllerFactory factory_;
|
| -};
|
| -
|
| } // namespace
|
|
|
| class RenderViewImplTest : public RenderViewTest {
|
| @@ -342,15 +320,9 @@
|
| }
|
|
|
| TEST_F(RenderViewImplTest, DecideNavigationPolicy) {
|
| - WebUITestClient client;
|
| - WebUITestBrowserClient browser_client;
|
| - ContentClient* old_client = GetContentClient();
|
| - ContentBrowserClient* old_browser_client = GetContentClient()->browser();
|
| + WebUITestWebUIControllerFactory factory;
|
| + WebUIControllerFactory::RegisterFactory(&factory);
|
|
|
| - SetContentClient(&client);
|
| - GetContentClient()->set_browser_for_testing(&browser_client);
|
| - client.set_renderer_for_testing(old_client->renderer());
|
| -
|
| // Navigations to normal HTTP URLs can be handled locally.
|
| WebKit::WebURLRequest request(GURL("http://foo.com"));
|
| WebKit::WebNavigationPolicy policy = view()->decidePolicyForNavigation(
|
| @@ -384,9 +356,6 @@
|
| WebKit::WebNavigationPolicyNewForegroundTab,
|
| false);
|
| EXPECT_EQ(WebKit::WebNavigationPolicyIgnore, policy);
|
| -
|
| - GetContentClient()->set_browser_for_testing(old_browser_client);
|
| - SetContentClient(old_client);
|
| }
|
|
|
| TEST_F(RenderViewImplTest, DecideNavigationPolicyForWebUI) {
|
|
|