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

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

Issue 2737353006: Replaced webPageOrderedClose with WebStateDelegate API. (Closed)
Patch Set: 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
« ios/web/web_state/web_state_impl.mm ('K') | « 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 1d84b6a284e3b8cdb6f20f0db3d088c0103710d4..ef8fe52d51bb377dc6c43e8d446d2cdc90b535da 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,
« ios/web/web_state/web_state_impl.mm ('K') | « 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