| Index: chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
|
| diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
|
| index 91ec5562a2cf7640a36382d39c89a797eb1afc9a..6897972d670f435e3844083d580d25151fa123a3 100644
|
| --- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
|
| +++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor_browsertest.cc
|
| @@ -44,6 +44,13 @@ using ::testing::DoAll;
|
| 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 {
|
| @@ -76,7 +83,7 @@ class PhishingDOMFeatureExtractorTest : public InProcessBrowserTest {
|
|
|
| virtual void SetUpOnMainThread() OVERRIDE {
|
| extractor_.reset(new PhishingDOMFeatureExtractor(
|
| - content::RenderView::FromRoutingID(1), &clock_));
|
| + content::RenderView::FromRoutingID(kRenderViewRoutingId), &clock_));
|
|
|
| ASSERT_TRUE(StartTestServer());
|
| host_resolver()->AddRule("*", "127.0.0.1");
|
| @@ -113,8 +120,9 @@ class PhishingDOMFeatureExtractorTest : public InProcessBrowserTest {
|
|
|
| // Does the actual work of removing the iframe "frame1" from the document.
|
| void RemoveIframe() {
|
| - blink::WebFrame* main_frame =
|
| - content::RenderView::FromRoutingID(1)->GetWebView()->mainFrame();
|
| + content::RenderView* render_view =
|
| + content::RenderView::FromRoutingID(kRenderViewRoutingId);
|
| + blink::WebFrame* main_frame = render_view->GetWebView()->mainFrame();
|
| ASSERT_TRUE(main_frame);
|
| main_frame->executeScript(
|
| blink::WebString(
|
|
|