| 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 8c777777f18229f755bfb2a8d38c3378b0c74117..333731bd348b05bdf7968f74bd3ed268a3cfd2a0 100644
|
| --- a/content/browser/webui/web_ui_unittest.cc
|
| +++ b/content/browser/webui/web_ui_unittest.cc
|
| @@ -177,19 +177,28 @@ TEST_F(WebUITest, FocusOnNavigate) {
|
| GURL next_url("http://google.com/");
|
| int next_page_id = page_id + 1;
|
| controller().LoadURL(next_url, GURL(), PageTransition::LINK);
|
| + TestRenderViewHost* old_rvh = rvh();
|
| + old_rvh->SendShouldCloseACK(true);
|
| pending_rvh()->SendNavigate(next_page_id, next_url);
|
| + old_rvh->OnSwapOutACK();
|
|
|
| // Navigate back. Should focus the location bar.
|
| int focus_called = tc->focus_called();
|
| ASSERT_TRUE(controller().CanGoBack());
|
| controller().GoBack();
|
| + old_rvh = rvh();
|
| + old_rvh->SendShouldCloseACK(true);
|
| pending_rvh()->SendNavigate(page_id, new_tab_url);
|
| + old_rvh->OnSwapOutACK();
|
| EXPECT_LT(focus_called, tc->focus_called());
|
|
|
| // Navigate forward. Shouldn't focus the location bar.
|
| focus_called = tc->focus_called();
|
| ASSERT_TRUE(controller().CanGoForward());
|
| controller().GoForward();
|
| + old_rvh = rvh();
|
| + old_rvh->SendShouldCloseACK(true);
|
| pending_rvh()->SendNavigate(next_page_id, next_url);
|
| + old_rvh->OnSwapOutACK();
|
| EXPECT_EQ(focus_called, tc->focus_called());
|
| }
|
|
|