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

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

Issue 1413393003: Change WebRTC IP handling policy from multiple booleans to an enum. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update GYP file with right order. Created 5 years, 1 month 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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=ExtensionPreferenceApiTest.Standard
7 7
8 var pn = chrome.privacy.network;
8 var preferences_to_test = [ 9 var preferences_to_test = [
9 { 10 {
10 root: chrome.privacy.network, 11 root: chrome.privacy.network,
11 preferences: [ 12 preferences: [
12 'networkPredictionEnabled', 13 'networkPredictionEnabled',
13 'webRTCMultipleRoutesEnabled', 14 'webRTCMultipleRoutesEnabled',
14 'webRTCNonProxiedUdpEnabled' 15 'webRTCNonProxiedUdpEnabled'
15 ] 16 ]
16 }, 17 },
17 { 18 {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 for (var i = 0; i < preferences_to_test.length; i++) { 80 for (var i = 0; i < preferences_to_test.length; i++) {
80 preferences_to_test[i].preferences.forEach( 81 preferences_to_test[i].preferences.forEach(
81 prefGetter.bind(preferences_to_test[i].root)); 82 prefGetter.bind(preferences_to_test[i].root));
82 } 83 }
83 }, 84 },
84 function setGlobals() { 85 function setGlobals() {
85 for (var i = 0; i < preferences_to_test.length; i++) { 86 for (var i = 0; i < preferences_to_test.length; i++) {
86 preferences_to_test[i].preferences.forEach( 87 preferences_to_test[i].preferences.forEach(
87 prefSetter.bind(preferences_to_test[i].root)); 88 prefSetter.bind(preferences_to_test[i].root));
88 } 89 }
90 },
91 // Set the WebRTCIPHhandlingPolicy and verify it in the get function.
92 function testWebRTCIPHandlingPolicy() {
93 if (pn.webRTCIPHandlingPolicy == undefined) {
94 chrome.test.callbackPass();
95 return;
96 }
97 pn.webRTCIPHandlingPolicy.get(
98 {},
99 expect(
100 {value: chrome.privacy.IPHandlingPolicy.DEFAULT_PUBLIC_INTERFACE_ONLY,
101 levelOfControl: 'controllable_by_this_extension'},
102 'should receive default_public_interface_only.'));
103
104 pn.webRTCIPHandlingPolicy.set(
105 {value: chrome.privacy.IPHandlingPolicy.DISABLE_NON_PROXIED_UDP});
106
107 pn.webRTCIPHandlingPolicy.get(
108 {},
109 expect(
110 {value: chrome.privacy.IPHandlingPolicy.DISABLE_NON_PROXIED_UDP,
111 levelOfControl: 'controlled_by_this_extension'},
112 'should receive disable_non_proxied_udp.'));
89 } 113 }
90 ]); 114 ]);
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698