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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 263423003: Add a policy to re-enable deprecated web platform features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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: chrome/browser/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 36d5954076efa0bd05036b028b2e68f7f74314f4..43cbb9eb7603b80ec6ddd36c1e8c204a79bf2fda 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -2974,6 +2974,27 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, NativeMessagingWhitelist) {
prefs, "other.host.name"));
}
+IN_PROC_BROWSER_TEST_F(PolicyTest,
+ EnableDeprecatedWebPlatformFeatures_ShowModalDialog) {
+ base::ListValue enabled_features;
+ enabled_features.Append(base::Value::CreateStringValue("ShowModalDialog"));
+ PolicyMap policies;
+ policies.Set(key::kEnableDeprecatedWebPlatformFeatures,
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ enabled_features.DeepCopy(),
+ NULL);
+ UpdateProviderPolicy(policies);
+
+ ui_test_utils::NavigateToURL(browser(), GURL(content::kAboutBlankURL));
+ bool result = false;
+ EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
+ browser()->tab_strip_model()->GetActiveWebContents(),
+ "domAutomationController.send(window.showModalDialog !== undefined);",
+ &result));
+ EXPECT_TRUE(result);
+}
+
#endif // !defined(CHROME_OS)
} // namespace policy

Powered by Google App Engine
This is Rietveld 408576698