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

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

Issue 2642233004: Removed Form Resubmission callback from CRWWebDelegate. (Closed)
Patch Set: Addressed review comments 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
Index: ios/web/web_state/web_state_delegate_bridge_unittest.mm
diff --git a/ios/web/web_state/web_state_delegate_bridge_unittest.mm b/ios/web/web_state/web_state_delegate_bridge_unittest.mm
index 422b0ecb4907405f5a40d74ef7370cc8a7e10502..65886409994e2b47d4205e8da33b21e0fa6d6c6c 100644
--- a/ios/web/web_state/web_state_delegate_bridge_unittest.mm
+++ b/ios/web/web_state/web_state_delegate_bridge_unittest.mm
@@ -97,6 +97,16 @@ TEST_F(WebStateDelegateBridgeTest, HandleContextMenu) {
EXPECT_EQ(context_menu_params.location.y, result_params->location.y);
}
+// Tests |ShowRepostFormWarningDialog| forwarding.
rohitrao (ping after 24h) 2017/01/24 14:15:13 Is it worth also testing that the default implemen
Eugene But (OOO till 7-30) 2017/01/24 21:33:11 Yep. Added the test.
+TEST_F(WebStateDelegateBridgeTest, ShowRepostFormWarningDialog) {
+ EXPECT_FALSE([delegate_ repostFormWarningRequested]);
+ EXPECT_FALSE([delegate_ webState]);
+ base::Callback<void(bool)> callback;
+ bridge_->ShowRepostFormWarningDialog(&test_web_state_, callback);
+ EXPECT_TRUE([delegate_ repostFormWarningRequested]);
+ EXPECT_EQ(&test_web_state_, [delegate_ webState]);
+}
+
// Tests |GetJavaScriptDialogPresenter| forwarding.
TEST_F(WebStateDelegateBridgeTest, GetJavaScriptDialogPresenter) {
EXPECT_FALSE([delegate_ javaScriptDialogPresenterRequested]);

Powered by Google App Engine
This is Rietveld 408576698