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

Unified Diff: chrome/renderer/chrome_content_renderer_client_browsertest.cc

Issue 190663012: Run ContentMain in a browser_test's browser process. This removes duplication of code in the browse… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: try to fix android by restoring old path just for it Created 6 years, 9 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 | « chrome/interactive_ui_tests.isolate ('k') | chrome/renderer/extensions/dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_content_renderer_client_browsertest.cc
===================================================================
--- chrome/renderer/chrome_content_renderer_client_browsertest.cc (revision 257432)
+++ chrome/renderer/chrome_content_renderer_client_browsertest.cc (working copy)
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/render_messages.h"
+#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/test/base/chrome_render_view_test.h"
#include "url/gurl.h"
@@ -20,7 +21,9 @@
TEST_F(InstantProcessNavigationTest, ForkForNavigationsFromInstantProcess) {
CommandLine::ForCurrentProcess()->AppendSwitch(switches::kInstantProcess);
bool unused;
- EXPECT_TRUE(chrome_content_renderer_client_.ShouldFork(
+ ChromeContentRendererClient* client =
+ static_cast<ChromeContentRendererClient*>(content_renderer_client_.get());
+ EXPECT_TRUE(client->ShouldFork(
GetMainFrame(), GURL("http://foo"), "GET", false, false, &unused));
}
@@ -28,21 +31,23 @@
// to potentially Instant URLs get bounced back to the browser to be rebucketed
// into an Instant renderer if necessary.
TEST_F(InstantProcessNavigationTest, ForkForNavigationsToSearchURLs) {
+ ChromeContentRendererClient* client =
+ static_cast<ChromeContentRendererClient*>(content_renderer_client_.get());
chrome_render_thread_->set_io_message_loop_proxy(
base::MessageLoopProxy::current());
- chrome_content_renderer_client_.RenderThreadStarted();
+ client->RenderThreadStarted();
std::vector<GURL> search_urls;
search_urls.push_back(GURL("http://example.com/search"));
chrome_render_thread_->Send(new ChromeViewMsg_SetSearchURLs(
search_urls, GURL("http://example.com/newtab")));
bool unused;
- EXPECT_TRUE(chrome_content_renderer_client_.ShouldFork(
+ EXPECT_TRUE(client->ShouldFork(
GetMainFrame(), GURL("http://example.com/newtab"), "GET", false, false,
&unused));
- EXPECT_TRUE(chrome_content_renderer_client_.ShouldFork(
+ EXPECT_TRUE(client->ShouldFork(
GetMainFrame(), GURL("http://example.com/search?q=foo"), "GET", false,
false, &unused));
- EXPECT_FALSE(chrome_content_renderer_client_.ShouldFork(
+ EXPECT_FALSE(client->ShouldFork(
GetMainFrame(), GURL("http://example.com/"), "GET", false, false,
&unused));
}
« no previous file with comments | « chrome/interactive_ui_tests.isolate ('k') | chrome/renderer/extensions/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698