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

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

Issue 2094633004: [ios] Added DialogsSuppression public API to WebState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation Created 4 years, 6 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 58a1b114d7eec5303319386f34db90baa55cb360..6d72e90bbd6e6b00daf6085e8992496817ca0835 100644
--- a/ios/web/web_state/web_state_impl_unittest.mm
+++ b/ios/web/web_state/web_state_impl_unittest.mm
@@ -296,6 +296,19 @@ TEST_F(WebStateTest, WebUsageEnabled) {
EXPECT_FALSE(web_state_->GetWebController().webUsageEnabled);
}
+TEST_F(WebStateTest, ShouldSuppressDialogs) {
+ // Default is false.
+ ASSERT_FALSE(web_state_->ShouldSuppressDialogs());
+
+ web_state_->SetShouldSuppressDialogs(true);
+ EXPECT_TRUE(web_state_->ShouldSuppressDialogs());
+ EXPECT_TRUE(web_state_->GetWebController().shouldSuppressDialogs);
+
+ web_state_->SetShouldSuppressDialogs(false);
+ EXPECT_FALSE(web_state_->ShouldSuppressDialogs());
+ EXPECT_FALSE(web_state_->GetWebController().shouldSuppressDialogs);
+}
+
TEST_F(WebStateTest, ResponseHeaders) {
GURL real_url("http://foo.com/bar");
GURL frame_url("http://frames-r-us.com/");
« 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