Bug 1268804 Part 4: Add isSecureContext pref in test_interfaces for StorageManager, r=bz

This commit is contained in:
Shawn Huang 2017-03-07 16:28:56 +08:00
parent 7f3f03793f
commit 9c76c33226
3 changed files with 8 additions and 4 deletions

View File

@ -881,7 +881,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"StorageEvent",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "StorageManager", nightly: true},
{name: "StorageManager", nightly: true, isSecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
"StyleSheet",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -1313,6 +1313,7 @@ function createInterfaceMap(isXBLScope) {
var isWindows = /Windows/.test(navigator.oscpu);
var isAndroid = navigator.userAgent.includes("Android");
var isLinux = /Linux/.test(navigator.oscpu) && !isAndroid;
var isSecureContext = window.isSecureContext;
var interfaceMap = {};
@ -1332,6 +1333,7 @@ function createInterfaceMap(isXBLScope) {
(entry.linux === !isLinux) ||
(entry.android === !isAndroid && !entry.nightlyAndroid) ||
(entry.release === !isRelease) ||
(entry.isSecureContext === !isSecureContext) ||
entry.disabled) {
interfaceMap[entry.name] = false;
} else {

View File

@ -15,7 +15,7 @@ var supportedProps = [
"language",
"languages",
"hardwareConcurrency",
{ name: "storage", nightly: true },
{ name: "storage", nightly: true, isSecureContext: true },
"connection",
];
@ -39,7 +39,8 @@ function startTest(channelData) {
}
if (prop.nightly === !channelData.isNightly ||
prop.release === !channelData.isRelease) {
prop.release === !channelData.isRelease ||
prop.isSecureContext === !isSecureContext) {
interfaceMap[prop.name] = false;
continue;
}

View File

@ -192,7 +192,7 @@ var interfaceNamesInGlobalScope =
// IMPORTANT: Do not change this list without review from a DOM peer!
"ServiceWorkerRegistration",
// IMPORTANT: Do not change this list without review from a DOM peer!
{name: "StorageManager", nightly: true},
{name: "StorageManager", nightly: true, isSecureContext: true},
// IMPORTANT: Do not change this list without review from a DOM peer!
"SubtleCrypto",
// IMPORTANT: Do not change this list without review from a DOM peer!
@ -265,6 +265,7 @@ function createInterfaceMap(version, userAgent) {
(entry.desktop === !isDesktop) ||
(entry.android === !isAndroid && !entry.nightlyAndroid) ||
(entry.release === !isRelease) ||
(entry.isSecureContext === !isSecureContext) ||
entry.disabled) {
interfaceMap[entry.name] = false;
} else if (entry.optional) {