Index: content/browser/webui/web_ui_unittest.cc |
diff --git a/content/browser/webui/web_ui_unittest.cc b/content/browser/webui/web_ui_unittest.cc |
index b81f3a811335d0df59443533ab2428fade23946a..036ff56afd892cf5bd3592ebfb0e2202f6f3b1ec 100644 |
--- a/content/browser/webui/web_ui_unittest.cc |
+++ b/content/browser/webui/web_ui_unittest.cc |
@@ -178,12 +178,14 @@ TEST_F(WebUITest, FocusOnNavigate) { |
GURL next_url("http://google.com/"); |
int next_page_id = page_id + 1; |
controller().LoadURL(next_url, GURL(), PageTransition::LINK); |
+ rvh()->SendShouldCloseACK(true); |
pending_rvh()->SendNavigate(next_page_id, next_url); |
// Navigate back. Should focus the location bar. |
int focus_called = tc->focus_called(); |
ASSERT_TRUE(controller().CanGoBack()); |
controller().GoBack(); |
+ rvh()->SendShouldCloseACK(true); |
pending_rvh()->SendNavigate(page_id, new_tab_url); |
EXPECT_LT(focus_called, tc->focus_called()); |
@@ -191,6 +193,7 @@ TEST_F(WebUITest, FocusOnNavigate) { |
focus_called = tc->focus_called(); |
ASSERT_TRUE(controller().CanGoForward()); |
controller().GoForward(); |
+ rvh()->SendShouldCloseACK(true); |
pending_rvh()->SendNavigate(next_page_id, next_url); |
EXPECT_EQ(focus_called, tc->focus_called()); |
} |