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

Unified Diff: ios/chrome/test/app/settings_test_util.mm

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years 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/chrome/test/app/settings_test_util.h ('k') | ios/chrome/test/app/signin_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/app/settings_test_util.mm
diff --git a/ios/chrome/test/app/settings_test_util.mm b/ios/chrome/test/app/settings_test_util.mm
new file mode 100644
index 0000000000000000000000000000000000000000..3e122d1471aa27fd5c9316133f97950f890841a0
--- /dev/null
+++ b/ios/chrome/test/app/settings_test_util.mm
@@ -0,0 +1,20 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import "ios/chrome/test/app/settings_test_util.h"
+
+#include "components/content_settings/core/browser/host_content_settings_map.h"
+#include "ios/chrome/browser/content_settings/host_content_settings_map_factory.h"
+#import "ios/chrome/test/app/chrome_test_util.h"
+
+namespace chrome_test_util {
+
+void SetContentSettingsBlockPopups(ContentSetting setting) {
+ ios::ChromeBrowserState* browser_state = GetOriginalBrowserState();
+ HostContentSettingsMap* settings_map =
+ ios::HostContentSettingsMapFactory::GetForBrowserState(browser_state);
+ settings_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_POPUPS, setting);
+}
+
+} // namespace chrome_test_util
« no previous file with comments | « ios/chrome/test/app/settings_test_util.h ('k') | ios/chrome/test/app/signin_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698