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

Unified Diff: content/browser/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: Update comments. Created 9 years, 8 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
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());
}

Powered by Google App Engine
This is Rietveld 408576698