| 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());
|
|
|