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

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

Issue 1315223002: Add `privacy.network.webRTCNonProxiedUdpTransportEnabled` to extensions API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Preferences API test 5 // Preferences API test
6 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceApi 6 // Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceApi
7 7
8 var preferences_to_test = [ 8 var preferences_to_test = [
9 { 9 {
10 root: chrome.privacy.network, 10 root: chrome.privacy.network,
11 preferences: [ 11 preferences: [
12 'networkPredictionEnabled', 12 'networkPredictionEnabled',
13 'webRTCMultipleRoutesEnabled' 13 'webRTCMultipleRoutesEnabled',
14 'webRTCNonProxiedUdpTransportEnabled'
14 ] 15 ]
15 }, 16 },
16 { 17 {
17 root: chrome.privacy.websites, 18 root: chrome.privacy.websites,
18 preferences: [ 19 preferences: [
19 'thirdPartyCookiesAllowed', 20 'thirdPartyCookiesAllowed',
20 'hyperlinkAuditingEnabled', 21 'hyperlinkAuditingEnabled',
21 'referrersEnabled', 22 'referrersEnabled',
22 'protectedContentEnabled' 23 'protectedContentEnabled'
23 ] 24 ]
(...skipping 10 matching lines...) Expand all
34 'searchSuggestEnabled', 35 'searchSuggestEnabled',
35 'spellingServiceEnabled', 36 'spellingServiceEnabled',
36 'translationServiceEnabled' 37 'translationServiceEnabled'
37 ] 38 ]
38 }, 39 },
39 ]; 40 ];
40 41
41 // Some preferences are only present on certain platforms or are hidden 42 // Some preferences are only present on certain platforms or are hidden
42 // behind flags and might not be present when this test runs. 43 // behind flags and might not be present when this test runs.
43 var possibly_missing_preferences = new Set([ 44 var possibly_missing_preferences = new Set([
44 'protectedContentEnabled', // Windows/ChromeOS only 45 'protectedContentEnabled', // Windows/ChromeOS only
45 'webRTCMultipleRoutesEnabled' // requires ENABLE_WEBRTC=1 46 'webRTCMultipleRoutesEnabled', // requires ENABLE_WEBRTC=1
47 'webRTCNonProxiedUdpTransportEnabled' // requires ENABLE_WEBRTC=1
46 ]); 48 ]);
47 49
48 function expect(expected, message) { 50 function expect(expected, message) {
49 return chrome.test.callbackPass(function(value) { 51 return chrome.test.callbackPass(function(value) {
50 chrome.test.assertEq(expected, value, message); 52 chrome.test.assertEq(expected, value, message);
51 }); 53 });
52 } 54 }
53 55
54 function expectFalse(pref) { 56 function expectFalse(pref) {
55 return expect({ 57 return expect({
(...skipping 23 matching lines...) Expand all
79 prefGetter.bind(preferences_to_test[i].root)); 81 prefGetter.bind(preferences_to_test[i].root));
80 } 82 }
81 }, 83 },
82 function setGlobals() { 84 function setGlobals() {
83 for (var i = 0; i < preferences_to_test.length; i++) { 85 for (var i = 0; i < preferences_to_test.length; i++) {
84 preferences_to_test[i].preferences.forEach( 86 preferences_to_test[i].preferences.forEach(
85 prefSetter.bind(preferences_to_test[i].root)); 87 prefSetter.bind(preferences_to_test[i].root));
86 } 88 }
87 } 89 }
88 ]); 90 ]);
OLDNEW
« chrome/common/extensions/api/privacy.json ('K') | « chrome/common/extensions/api/privacy.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698