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

Unified Diff: chrome/test/data/extensions/api_test/content_settings/standard/test.js

Issue 2358893004: Deprecate chrome.contentSettings.{fullscreen,mouselock} extension API. (Closed)
Patch Set: Respond to review. Created 4 years, 3 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 | « chrome/renderer/resources/extensions/content_setting.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/content_settings/standard/test.js
diff --git a/chrome/test/data/extensions/api_test/content_settings/standard/test.js b/chrome/test/data/extensions/api_test/content_settings/standard/test.js
index 856ff20559b1c0ff0111fbc5091ca00426c00cce..237f9c1a274b02914a291e7fb2645e6e60c32d92 100644
--- a/chrome/test/data/extensions/api_test/content_settings/standard/test.js
+++ b/chrome/test/data/extensions/api_test/content_settings/standard/test.js
@@ -30,14 +30,24 @@ var settings = {
"popups": "allow",
"location": "block",
"notifications": "block",
- "fullscreen": "allow",
- "mouselock": "block",
+ "fullscreen": "block", // Should be ignored.
+ "mouselock": "block", // Should be ignored.
"microphone": "block",
"camera": "block",
"unsandboxedPlugins": "block",
"automaticDownloads": "block"
};
+// List of settings that are expected to return different values than were
+// written, due to deprecation. For example, "fullscreen" is set to "block" but
+// we expect this to be ignored, and so read back as "allow". Any setting
+// omitted from this list is expected to read back whatever was written.
+var deprecatedSettingsExpectations = {
+ // Due to deprecation, these should be "allow", regardless of the setting.
+ "fullscreen": "allow",
+ "mouselock": "allow"
+};
+
Object.prototype.forEach = function(f) {
var k;
for (k in this) {
@@ -80,6 +90,7 @@ chrome.test.runTests([
},
function getContentSettings() {
settings.forEach(function(type, setting) {
+ setting = deprecatedSettingsExpectations[type] || setting;
var message = "Setting for " + type + " should be " + setting;
cs[type].get({
'primaryUrl': 'http://www.google.com',
« no previous file with comments | « chrome/renderer/resources/extensions/content_setting.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698