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

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

Issue 940893003: Add `privacy.network.webRTCMultipleRoutesEnabled` to extensions API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webrtc-flag-landed
Patch Set: Changed Array to Set. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/api/privacy.json ('k') | no next file » | 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 972c2b98af877e0be94b622fb2854af621a5228d..905bdbf3b3230af4097bd48ba72500432e1aebe0 100644
--- a/chrome/test/data/extensions/api_test/preference/standard/test.js
+++ b/chrome/test/data/extensions/api_test/preference/standard/test.js
@@ -9,7 +9,8 @@ var preferences_to_test = [
{
root: chrome.privacy.network,
preferences: [
- 'networkPredictionEnabled'
+ 'networkPredictionEnabled',
+ 'webRTCMultipleRoutesEnabled'
]
},
{
@@ -37,6 +38,13 @@ var preferences_to_test = [
},
];
+// Some preferences are only present on certain platforms or are hidden
+// behind flags and might not be present when this test runs.
+var possibly_missing_preferences = new Set([
+ 'protectedContentEnabled', // Windows/ChromeOS only
+ 'webRTCMultipleRoutesEnabled' // requires ENABLE_WEBRTC=1
+]);
+
function expect(expected, message) {
return chrome.test.callbackPass(function(value) {
chrome.test.assertEq(expected, value, message);
@@ -51,18 +59,14 @@ function expectFalse(pref) {
}
function prefGetter(pref) {
- if (pref === 'protectedContentEnabled' && !this[pref]) {
- // `protectedContentEnabled` is Windows/ChromeOS only, so it might not exist
- // when this test runs, and that's pretty much OK.
+ if (possibly_missing_preferences.has(pref) && !this[pref]) {
return true;
}
this[pref].get({}, expectFalse(pref));
}
function prefSetter(pref) {
- if (pref === 'protectedContentEnabled' && !this[pref]) {
- // `protectedContentEnabled` is Windows/ChromeOS only, so it might not exist
- // when this test runs, and that's pretty much OK.
+ if (possibly_missing_preferences.has(pref) && !this[pref]) {
return true;
}
this[pref].set({value: true}, chrome.test.callbackPass());
« no previous file with comments | « chrome/common/extensions/api/privacy.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698