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

Unified Diff: trunk/src/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc

Issue 105523006: Revert 241151 "Make RenderFrameHostManager swap RenderFrameHosts..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years 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: trunk/src/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
===================================================================
--- trunk/src/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc (revision 241158)
+++ trunk/src/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc (working copy)
@@ -44,13 +44,6 @@
using ::testing::Invoke;
using ::testing::Return;
-namespace {
-
-// The first RenderFrame is routing ID 1, and the first RenderView is 2.
-const int kRenderViewRoutingId = 2;
-
-}
-
namespace safe_browsing {
class PhishingDOMFeatureExtractorTest : public InProcessBrowserTest {
@@ -83,7 +76,7 @@
virtual void SetUpOnMainThread() OVERRIDE {
extractor_.reset(new PhishingDOMFeatureExtractor(
- content::RenderView::FromRoutingID(kRenderViewRoutingId), &clock_));
+ content::RenderView::FromRoutingID(1), &clock_));
ASSERT_TRUE(StartTestServer());
host_resolver()->AddRule("*", "127.0.0.1");
@@ -120,9 +113,8 @@
// Does the actual work of removing the iframe "frame1" from the document.
void RemoveIframe() {
- content::RenderView* render_view =
- content::RenderView::FromRoutingID(kRenderViewRoutingId);
- blink::WebFrame* main_frame = render_view->GetWebView()->mainFrame();
+ blink::WebFrame* main_frame =
+ content::RenderView::FromRoutingID(1)->GetWebView()->mainFrame();
ASSERT_TRUE(main_frame);
main_frame->executeScript(
blink::WebString(

Powered by Google App Engine
This is Rietveld 408576698