зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1495358 - FeaturePolicy: vr, r=kip
This commit is contained in:
Родитель
f3b4178593
Коммит
9c943359e1
|
@ -1274,11 +1274,17 @@ Navigator::RequestGamepadServiceTest()
|
|||
already_AddRefed<Promise>
|
||||
Navigator::GetVRDisplays(ErrorResult& aRv)
|
||||
{
|
||||
if (!mWindow || !mWindow->GetDocShell()) {
|
||||
if (!mWindow || !mWindow->GetDocShell() || !mWindow->GetExtantDoc()) {
|
||||
aRv.Throw(NS_ERROR_UNEXPECTED);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (!FeaturePolicyUtils::IsFeatureAllowed(mWindow->GetExtantDoc(),
|
||||
NS_LITERAL_STRING("vr"))) {
|
||||
aRv.Throw(NS_ERROR_DOM_SECURITY_ERR);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsGlobalWindowInner* win = nsGlobalWindowInner::Cast(mWindow);
|
||||
win->NotifyVREventListenerAdded();
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ static FeatureMap sSupportedFeatures[] = {
|
|||
{ "payment", FeatureMap::eSelf },
|
||||
// TODO: not supported yet!!!
|
||||
{ "speaker", FeatureMap::eSelf },
|
||||
// TODO: not supported yet!!!
|
||||
{ "vr", FeatureMap::eSelf },
|
||||
};
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
prefs: [dom.vr.enabled:true]
|
||||
prefs: [dom.vr.enabled:true,dom.security.featurePolicy.enabled:true]
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
[webvr-disabled-by-feature-policy.https.sub.html]
|
||||
[Feature-Policy header vr "none" disallows the top-level document.]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy header vr "none" disallows same-origin iframes.]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy header vr "none" disallows cross-origin iframes.]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
[webvr-enabled-by-feature-policy-attribute-redirect-on-load.https.sub.html]
|
||||
[Feature-Policy allow="vr" attribute allows same-origin relocation]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy allow="vr" attribute disallows cross-origin relocation]
|
||||
expected: FAIL
|
||||
|
|
@ -1,7 +1,4 @@
|
|||
[webvr-enabled-by-feature-policy-attribute.https.sub.html]
|
||||
[Feature-Policy allow="vr" attribute allows same-origin iframe]
|
||||
expected: FAIL
|
||||
|
||||
[Feature-Policy allow="vr" attribute allows cross-origin iframe]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[webvr-enabled-on-self-origin-by-feature-policy.https.sub.html]
|
||||
[Feature-Policy header vr "self" disallows cross-origin iframes.]
|
||||
expected: FAIL
|
||||
|
Загрузка…
Ссылка в новой задаче