| Index: chrome/browser/ui/webui/web_ui_unittest.cc
|
| diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
|
| index 0d4543cd91260913393bd34a92b932bdb8e3c60e..a37b5cfb735b9dcdc374a5c066d9e968d6ef290e 100644
|
| --- a/chrome/browser/ui/webui/web_ui_unittest.cc
|
| +++ b/chrome/browser/ui/webui/web_ui_unittest.cc
|
| @@ -182,19 +182,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());
|
| }
|
|
|