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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/preference/standard/test.js
diff --git a/chrome/test/data/extensions/api_test/preference/standard/test.js b/chrome/test/data/extensions/api_test/preference/standard/test.js
index 8fdff4505a9e1bb2275280ed3131d410cfa6411e..5ffc64038fa97ac416e113aa0f88466eda909832 100644
--- a/chrome/test/data/extensions/api_test/preference/standard/test.js
+++ b/chrome/test/data/extensions/api_test/preference/standard/test.js
@@ -3,8 +3,9 @@
// found in the LICENSE file.
// Preferences API test
-// Run with browser_tests --gtest_filter=ExtensionApiTest.PreferenceApi
+// Run with browser_tests --gtest_filter=ExtensionPreferenceApiTest.Standard
+var pn = chrome.privacy.network;
var preferences_to_test = [
{
root: chrome.privacy.network,
@@ -86,5 +87,28 @@ chrome.test.runTests([
preferences_to_test[i].preferences.forEach(
prefSetter.bind(preferences_to_test[i].root));
}
+ },
+ // Set the WebRTCIPHhandlingPolicy and verify it in the get function.
+ function testWebRTCIPHandlingPolicy() {
+ if (pn.webRTCIPHandlingPolicy == undefined) {
+ chrome.test.callbackPass();
+ return;
+ }
+ pn.webRTCIPHandlingPolicy.get(
+ {},
+ expect(
+ {value: chrome.privacy.IPHandlingPolicy.DEFAULT_PUBLIC_INTERFACE_ONLY,
+ levelOfControl: 'controllable_by_this_extension'},
+ 'should receive default_public_interface_only.'));
+
+ pn.webRTCIPHandlingPolicy.set(
+ {value: chrome.privacy.IPHandlingPolicy.DISABLE_NON_PROXIED_UDP});
+
+ pn.webRTCIPHandlingPolicy.get(
+ {},
+ expect(
+ {value: chrome.privacy.IPHandlingPolicy.DISABLE_NON_PROXIED_UDP,
+ levelOfControl: 'controlled_by_this_extension'},
+ 'should receive disable_non_proxied_udp.'));
}
]);
« 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