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

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

Issue 2642233004: Removed Form Resubmission callback from CRWWebDelegate. (Closed)
Patch Set: Added ShowRepostFormWarningWithNoDelegateMethod test Created 3 years, 11 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 0337c0b6b55524b0922a081c4c0d7b55fb10f04c..25e5bf5bb379fc4c0cf8cefd2d35d89a9d7df992 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -417,6 +417,13 @@ TEST_F(WebStateTest, DelegateTest) {
web_state_->HandleContextMenu(context_menu_params);
EXPECT_TRUE(delegate.handle_context_menu_called());
+ // Test that ShowRepostFormWarningDialog() is called.
+ EXPECT_FALSE(delegate.last_repost_form_request());
+ base::Callback<void(bool)> repost_callback;
+ web_state_->ShowRepostFormWarningDialog(repost_callback);
+ ASSERT_TRUE(delegate.last_repost_form_request());
+ EXPECT_EQ(delegate.last_repost_form_request()->web_state, web_state_.get());
+
// Test that GetJavaScriptDialogPresenter() is called.
TestJavaScriptDialogPresenter* presenter =
delegate.GetTestJavaScriptDialogPresenter();
« 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