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

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

Issue 880223002: Expose microphone content setting to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed to 'microphone'. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Content settings API test 5 // Content settings API test
6 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.ContentSettings
7 7
8 var cs = chrome.contentSettings; 8 var cs = chrome.contentSettings;
9 var default_content_settings = { 9 var default_content_settings = {
10 "cookies": "session_only", 10 "cookies": "session_only",
11 "images": "allow", 11 "images": "allow",
12 "javascript": "block", 12 "javascript": "block",
13 "plugins": "allow", 13 "plugins": "allow",
14 "popups": "block", 14 "popups": "block",
15 "location": "ask", 15 "location": "ask",
16 "notifications": "ask", 16 "notifications": "ask",
17 "mouselock": "ask", 17 "mouselock": "ask",
18 "microphone": "ask",
18 }; 19 };
19 20
20 var settings = { 21 var settings = {
21 "cookies": "block", 22 "cookies": "block",
22 "images": "allow", 23 "images": "allow",
23 "javascript": "block", 24 "javascript": "block",
24 "plugins": "block", 25 "plugins": "block",
25 "popups": "allow", 26 "popups": "allow",
26 "location": "block", 27 "location": "block",
27 "notifications": "block", 28 "notifications": "block",
28 "mouselock": "block" 29 "mouselock": "block",
30 "microphone": "block"
29 }; 31 };
30 32
31 Object.prototype.forEach = function(f) { 33 Object.prototype.forEach = function(f) {
32 var k; 34 var k;
33 for (k in this) { 35 for (k in this) {
34 if (this.hasOwnProperty(k)) 36 if (this.hasOwnProperty(k))
35 f(k, this[k]); 37 f(k, this[k]);
36 } 38 }
37 }; 39 };
38 40
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 'setting': 'block' 89 'setting': 'block'
88 }, chrome.test.callbackFail("Specific paths are not allowed.")); 90 }, chrome.test.callbackFail("Specific paths are not allowed."));
89 cs.javascript.set({ 91 cs.javascript.set({
90 'primaryPattern': 'http://example.com/*', 92 'primaryPattern': 'http://example.com/*',
91 'secondaryPattern': 'file:///home/hansmoleman/*', 93 'secondaryPattern': 'file:///home/hansmoleman/*',
92 'setting': 'allow' 94 'setting': 'allow'
93 }, chrome.test.callbackFail( 95 }, chrome.test.callbackFail(
94 "Path wildcards in file URL patterns are not allowed.")); 96 "Path wildcards in file URL patterns are not allowed."));
95 } 97 }
96 ]); 98 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698