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

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: Tweak warning message. 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
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..6eb08186a8c93cca964562bd076772b575252b84 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,21 @@ 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"
};
+// If omitted, expected to be the same as |settings|.
+var expectations = {
Devlin 2016/09/26 20:30:37 I would add a bit more context here, and rename th
Matt Giuca 2016/09/27 01:18:33 Done.
+ // Due to deprecation, these should be "allow", regardless of the setting.
+ "fullscreen": "allow",
Devlin 2016/09/26 20:30:37 prefer single quotes in js
Matt Giuca 2016/09/27 01:18:33 I think it's appropriate to stay consistent with t
+ "mouselock": "allow"
+};
+
Object.prototype.forEach = function(f) {
var k;
for (k in this) {
@@ -80,6 +87,7 @@ chrome.test.runTests([
},
function getContentSettings() {
settings.forEach(function(type, setting) {
+ setting = expectations[type] || setting;
var message = "Setting for " + type + " should be " + setting;
cs[type].get({
'primaryUrl': 'http://www.google.com',

Powered by Google App Engine
This is Rietveld 408576698