Commit 86d4e6cc authored by Patricia Lor's avatar Patricia Lor Committed by Commit Bot

MD Settings: Add MIDI-SysEx to the Site Details page.

Since a driving factor behind releasing the "Site Details" page as part of MD
Settings is to replace default permissions in the Page Info bubble, the list of
permissions shown in "Site Details" should include all permissions shown in
the Page Info bubble. Add MIDI-SysEx to match it.

and check one of the permissions listed there is "MIDI devices".

Bug: 656758
Test: With #enable-site-details turned on, navigate to
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: Ic111c09c17aef557990ae4f522151b294ab84842
chrome: //settings/content/siteDetails?site=https%3A%2F%2Fpermission.site
Reviewed-on: https://chromium-review.googlesource.com/578758
Commit-Queue: Patti <patricialor@chromium.org>
Reviewed-by: default avatarTim Sergeant <tsergeant@chromium.org>
Reviewed-by: default avatarcalamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488604}
parent 79c900fa
...@@ -104,6 +104,10 @@ ...@@ -104,6 +104,10 @@
icon="cr:file-download" id="automaticDownloads" icon="cr:file-download" id="automaticDownloads"
label="$i18n{siteSettingsAutomaticDownloads}"> label="$i18n{siteSettingsAutomaticDownloads}">
</site-details-permission> </site-details-permission>
<site-details-permission
category="{{ContentSettingsTypes.MIDI_DEVICES}}" icon="settings:midi"
id="midiDevices" label="$i18n{siteSettingsMidiDevices}">
</site-details-permission>
<site-details-permission <site-details-permission
category="{{ContentSettingsTypes.UNSANDBOXED_PLUGINS}}" category="{{ContentSettingsTypes.UNSANDBOXED_PLUGINS}}"
icon="cr:extension" id="unsandboxedPlugins" icon="cr:extension" id="unsandboxedPlugins"
......
...@@ -64,7 +64,7 @@ var prefsMixedOriginAndPattern = { ...@@ -64,7 +64,7 @@ var prefsMixedOriginAndPattern = {
mic: [], mic: [],
notifications: [], notifications: [],
plugins: [], plugins: [],
midiDevices: [], midi_devices: [],
protectedContent: [], protectedContent: [],
popups: [], popups: [],
unsandboxed_plugins: [], unsandboxed_plugins: [],
...@@ -102,7 +102,7 @@ var prefsVarious = { ...@@ -102,7 +102,7 @@ var prefsVarious = {
images: [], images: [],
javascript: [], javascript: [],
mic: [], mic: [],
midiDevices: [], midi_devices: [],
notifications: [ notifications: [
{ {
embeddingOrigin: '', embeddingOrigin: '',
......
...@@ -41,6 +41,9 @@ suite('SiteDetails', function() { ...@@ -41,6 +41,9 @@ suite('SiteDetails', function() {
mic: { mic: {
setting: settings.ContentSetting.ASK, setting: settings.ContentSetting.ASK,
}, },
midi_devices: {
setting: settings.ContentSetting.ASK,
},
notifications: { notifications: {
setting: settings.ContentSetting.ASK, setting: settings.ContentSetting.ASK,
}, },
...@@ -111,6 +114,14 @@ suite('SiteDetails', function() { ...@@ -111,6 +114,14 @@ suite('SiteDetails', function() {
source: 'preference', source: 'preference',
}, },
], ],
midi_devices: [
{
embeddingOrigin: 'https://foo.com:443',
origin: 'https://foo.com:443',
setting: settings.ContentSetting.ALLOW,
source: 'preference',
},
],
notifications: [ notifications: [
{ {
embeddingOrigin: 'https://foo.com:443', embeddingOrigin: 'https://foo.com:443',
......
...@@ -46,7 +46,7 @@ var prefsGeolocation = { ...@@ -46,7 +46,7 @@ var prefsGeolocation = {
images: [], images: [],
javascript: [], javascript: [],
mic: [], mic: [],
midiDevices: [], midi_devices: [],
notifications: [], notifications: [],
plugins: [], plugins: [],
protectedContent: [], protectedContent: [],
...@@ -180,7 +180,7 @@ var prefsVarious = { ...@@ -180,7 +180,7 @@ var prefsVarious = {
images: [], images: [],
javascript: [], javascript: [],
mic: [], mic: [],
midiDevices: [], midi_devices: [],
notifications: [ notifications: [
{ {
embeddingOrigin: '', embeddingOrigin: '',
......
...@@ -26,7 +26,7 @@ var prefsEmpty = { ...@@ -26,7 +26,7 @@ var prefsEmpty = {
geolocation: {}, geolocation: {},
javascript: {}, javascript: {},
mic: {}, mic: {},
midiDevices: {}, midi_devices: {},
notifications: {}, notifications: {},
plugins: {}, plugins: {},
images: {}, images: {},
...@@ -42,7 +42,7 @@ var prefsEmpty = { ...@@ -42,7 +42,7 @@ var prefsEmpty = {
geolocation: [], geolocation: [],
javascript: [], javascript: [],
mic: [], mic: [],
midiDevices: [], midi_devices: [],
notifications: [], notifications: [],
plugins: [], plugins: [],
images: [], images: [],
...@@ -203,7 +203,7 @@ TestSiteSettingsPrefsBrowserProxy.prototype = { ...@@ -203,7 +203,7 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
} else if (contentType == settings.ContentSettingsTypes.MIC) { } else if (contentType == settings.ContentSettingsTypes.MIC) {
pref = this.prefs_.defaults.mic; pref = this.prefs_.defaults.mic;
} else if (contentType == settings.ContentSettingsTypes.MIDI_DEVICES) { } else if (contentType == settings.ContentSettingsTypes.MIDI_DEVICES) {
pref = this.prefs_.defaults.midiDevices; pref = this.prefs_.defaults.midi_devices;
} else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) { } else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) {
pref = this.prefs_.defaults.notifications; pref = this.prefs_.defaults.notifications;
} else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) { } else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) {
...@@ -247,7 +247,7 @@ TestSiteSettingsPrefsBrowserProxy.prototype = { ...@@ -247,7 +247,7 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
else if (contentType == settings.ContentSettingsTypes.MIC) else if (contentType == settings.ContentSettingsTypes.MIC)
pref = this.prefs_.exceptions.mic; pref = this.prefs_.exceptions.mic;
else if (contentType == settings.ContentSettingsTypes.MIDI_DEVICES) else if (contentType == settings.ContentSettingsTypes.MIDI_DEVICES)
pref = this.prefs_.exceptions.midiDevices; pref = this.prefs_.exceptions.midi_devices;
else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS) else if (contentType == settings.ContentSettingsTypes.NOTIFICATIONS)
pref = this.prefs_.exceptions.notifications; pref = this.prefs_.exceptions.notifications;
else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS) else if (contentType == settings.ContentSettingsTypes.PDF_DOCUMENTS)
...@@ -309,6 +309,8 @@ TestSiteSettingsPrefsBrowserProxy.prototype = { ...@@ -309,6 +309,8 @@ TestSiteSettingsPrefsBrowserProxy.prototype = {
contentType = 'camera'; contentType = 'camera';
} else if (contentType == settings.ContentSettingsTypes.MIC) { } else if (contentType == settings.ContentSettingsTypes.MIC) {
contentType = 'mic'; contentType = 'mic';
} else if (contentType == settings.ContentSettingsTypes.MIDI_DEVICES) {
contentType = 'midi_devices';
} else if (contentType == settings.ContentSettingsTypes.BACKGROUND_SYNC) { } else if (contentType == settings.ContentSettingsTypes.BACKGROUND_SYNC) {
contentType = 'background_sync'; contentType = 'background_sync';
} else if ( } else if (
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment