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

Unified Diff: chrome/browser/ui/webui/web_ui_unittest.cc

Issue 6319001: Support window.opener after a process swap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 9 years, 7 months 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/visitedlink/visitedlink_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/visitedlink/visitedlink_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698