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

Unified Diff: ios/web/web_state/web_state_impl_unittest.mm

Issue 2737353006: Replaced webPageOrderedClose with WebStateDelegate API. (Closed)
Patch Set: Addressed review comments Created 3 years, 9 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 | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/web_state_impl_unittest.mm
diff --git a/ios/web/web_state/web_state_impl_unittest.mm b/ios/web/web_state/web_state_impl_unittest.mm
index 3bbdb05a25b51a6ca4f1c1f9dc5b66c4413b3539..2bd63b701e5f0e20fc95321512a322bf1c19c5c7 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -435,6 +435,13 @@ TEST_F(WebStateImplTest, DelegateTest) {
EXPECT_EQ(opener_url, create_new_web_state_request->opener_url);
EXPECT_TRUE(create_new_web_state_request->initiated_by_user);
+ // Test that CloseWebState() is called.
+ EXPECT_FALSE(delegate.last_close_web_state_request());
+ web_state_->CloseWebState();
+ ASSERT_TRUE(delegate.last_close_web_state_request());
+ EXPECT_EQ(web_state_.get(),
+ delegate.last_close_web_state_request()->web_state);
+
// Test that OpenURLFromWebState() is called.
WebState::OpenURLParams params(GURL("https://chromium.test/"), Referrer(),
WindowOpenDisposition::CURRENT_TAB,
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698