Backed out 2 changesets (bug 1514296) for causing beta simulation failures CLOSED TREE

Backed out changeset 88f4a687f039 (bug 1514296)
Backed out changeset fe343795c247 (bug 1514296)
This commit is contained in:
Ciure Andrei
2019-07-08 03:03:22 +03:00
parent 5201c41217
commit 02f18b2aed
34 changed files with 1363 additions and 125 deletions

View File

@@ -2211,7 +2211,7 @@ nsresult Document::Init() {
// we need to create a policy here so getting the policy within
// ::Policy() can *always* return a non null policy
mFeaturePolicy = new mozilla::dom::FeaturePolicy(this);
mFeaturePolicy = new FeaturePolicy(this);
mFeaturePolicy->SetDefaultOrigin(NodePrincipal());
mStyleSet = MakeUnique<ServoStyleSet>(*this);
@@ -3275,14 +3275,14 @@ nsresult Document::InitFeaturePolicy(nsIChannel* aChannel) {
mFeaturePolicy->SetDefaultOrigin(NodePrincipal());
RefPtr<mozilla::dom::FeaturePolicy> parentPolicy = nullptr;
RefPtr<FeaturePolicy> parentPolicy = nullptr;
if (mDocumentContainer) {
nsPIDOMWindowOuter* containerWindow = mDocumentContainer->GetWindow();
if (containerWindow) {
nsCOMPtr<nsINode> node = containerWindow->GetFrameElementInternal();
HTMLIFrameElement* iframe = HTMLIFrameElement::FromNodeOrNull(node);
if (iframe) {
parentPolicy = iframe->FeaturePolicy();
parentPolicy = iframe->Policy();
}
}
}
@@ -12573,10 +12573,10 @@ void Document::MaybeResolveReadyForIdle() {
}
}
mozilla::dom::FeaturePolicy* Document::FeaturePolicy() const {
FeaturePolicy* Document::Policy() const {
// The policy is created when the document is initialized. We _must_ have a
// policy here even if the featurePolicy pref is off. If this assertion fails,
// it means that ::FeaturePolicy() is called before ::StartDocumentLoad().
// it means that ::Policy() is called before ::StartDocumentLoad().
MOZ_ASSERT(mFeaturePolicy);
return mFeaturePolicy;
}

View File

@@ -4052,7 +4052,7 @@ class Document : public nsINode,
mAllowPaymentRequest = aAllowPaymentRequest;
}
mozilla::dom::FeaturePolicy* FeaturePolicy() const;
FeaturePolicy* Policy() const;
bool ModuleScriptsEnabled();
@@ -4474,7 +4474,7 @@ class Document : public nsINode,
RefPtr<Promise> mReadyForIdle;
RefPtr<mozilla::dom::FeaturePolicy> mFeaturePolicy;
RefPtr<FeaturePolicy> mFeaturePolicy;
UniquePtr<ResizeObserverController> mResizeObserverController;

View File

@@ -54,7 +54,7 @@ HTMLIFrameElement::HTMLIFrameElement(
FromParser aFromParser)
: nsGenericHTMLFrameElement(std::move(aNodeInfo), aFromParser) {
// We always need a featurePolicy, even if not exposed.
mFeaturePolicy = new mozilla::dom::FeaturePolicy(this);
mFeaturePolicy = new FeaturePolicy(this);
nsCOMPtr<nsIPrincipal> origin = GetFeaturePolicyDefaultOrigin();
MOZ_ASSERT(origin);
@@ -224,9 +224,7 @@ JSObject* HTMLIFrameElement::WrapNode(JSContext* aCx,
return HTMLIFrameElement_Binding::Wrap(aCx, this, aGivenProto);
}
mozilla::dom::FeaturePolicy* HTMLIFrameElement::FeaturePolicy() const {
return mFeaturePolicy;
}
FeaturePolicy* HTMLIFrameElement::Policy() const { return mFeaturePolicy; }
already_AddRefed<nsIPrincipal>
HTMLIFrameElement::GetFeaturePolicyDefaultOrigin() const {
@@ -270,7 +268,7 @@ void HTMLIFrameElement::RefreshFeaturePolicy(bool aParseAllowAttribute) {
origin);
}
mFeaturePolicy->InheritPolicy(OwnerDoc()->FeaturePolicy());
mFeaturePolicy->InheritPolicy(OwnerDoc()->Policy());
}
if (AllowPaymentRequest()) {

View File

@@ -154,7 +154,7 @@ class HTMLIFrameElement final : public nsGenericHTMLFrameElement {
bool FullscreenFlag() const { return mFullscreenFlag; }
void SetFullscreenFlag(bool aValue) { mFullscreenFlag = aValue; }
mozilla::dom::FeaturePolicy* FeaturePolicy() const;
FeaturePolicy* Policy() const;
protected:
virtual ~HTMLIFrameElement();

View File

@@ -90,7 +90,7 @@ void FeaturePolicy::ResetDeclaredPolicy() { mFeatures.Clear(); }
JSObject* FeaturePolicy::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) {
return FeaturePolicy_Binding::Wrap(aCx, this, aGivenProto);
return Policy_Binding::Wrap(aCx, this, aGivenProto);
}
bool FeaturePolicy::AllowsFeature(const nsAString& aFeatureName,

View File

@@ -92,7 +92,7 @@ bool FeaturePolicyUtils::IsFeatureAllowed(Document* aDocument,
return true;
}
FeaturePolicy* policy = aDocument->FeaturePolicy();
FeaturePolicy* policy = aDocument->Policy();
MOZ_ASSERT(policy);
if (policy->AllowsFeatureInternal(aFeatureName, policy->DefaultOrigin())) {

View File

@@ -12,40 +12,40 @@
SimpleTest.waitForExplicitFinish();
function test_document() {
info("Checking document.featurePolicy");
ok("featurePolicy" in document, "We have document.featurePolicy");
info("Checking document.policy");
ok("policy" in document, "We have document.policy");
ok(!document.featurePolicy.allowsFeature("foobar"), "Random feature");
ok(!document.featurePolicy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(!document.policy.allowsFeature("foobar"), "Random feature");
ok(!document.policy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(document.featurePolicy.allowsFeature("camera"), "Camera is allowed for self");
ok(document.featurePolicy.allowsFeature("camera", "http://foo.bar"), "Camera is always allowed");
let allowed = document.featurePolicy.getAllowlistForFeature("camera");
ok(document.policy.allowsFeature("camera"), "Camera is allowed for self");
ok(document.policy.allowsFeature("camera", "http://foo.bar"), "Camera is always allowed");
let allowed = document.policy.getAllowlistForFeature("camera");
is(allowed.length, 1, "Only 1 entry in allowlist for camera");
is(allowed[0], "*", "allowlist is *");
ok(document.featurePolicy.allowsFeature("geolocation"), "Geolocation is allowed for self");
ok(document.featurePolicy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for self");
ok(!document.featurePolicy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is not allowed for any random URL");
allowed = document.featurePolicy.getAllowlistForFeature("geolocation");
ok(document.policy.allowsFeature("geolocation"), "Geolocation is allowed for self");
ok(document.policy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for self");
ok(!document.policy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is not allowed for any random URL");
allowed = document.policy.getAllowlistForFeature("geolocation");
is(allowed.length, 1, "Only 1 entry in allowlist for geolocation");
is(allowed[0], location.origin, "allowlist is self");
ok(!document.featurePolicy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!document.featurePolicy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!document.featurePolicy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(document.featurePolicy.allowsFeature("microphone", "http://example.com"), "Microphone is allowed for example.com");
ok(document.featurePolicy.allowsFeature("microphone", "http://example.org"), "Microphone is allowed for example.org");
allowed = document.featurePolicy.getAllowlistForFeature("microphone");
ok(!document.policy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!document.policy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!document.policy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(document.policy.allowsFeature("microphone", "http://example.com"), "Microphone is allowed for example.com");
ok(document.policy.allowsFeature("microphone", "http://example.org"), "Microphone is allowed for example.org");
allowed = document.policy.getAllowlistForFeature("microphone");
is(allowed.length, 0, "No allowlist for microphone");
ok(!document.featurePolicy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!document.featurePolicy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!document.featurePolicy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = document.featurePolicy.getAllowlistForFeature("vr");
ok(!document.policy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!document.policy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!document.policy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = document.policy.getAllowlistForFeature("vr");
is(allowed.length, 0, "No allowlist for vr");
allowed = document.featurePolicy.allowedFeatures();
allowed = document.policy.allowedFeatures();
// microphone is disabled for this origin, vr is disabled everywhere.
let camera = false;
let geolocation = false;
@@ -61,136 +61,136 @@ function test_document() {
}
function test_iframe_without_allow() {
info("Checking HTMLIFrameElement.featurePolicy");
info("Checking HTMLIFrameElement.policy");
let ifr = document.getElementById("ifr");
ok("featurePolicy" in ifr, "HTMLIFrameElement.featurePolicy exists");
ok("policy" in ifr, "HTMLIFrameElement.policy exists");
ok(!ifr.featurePolicy.allowsFeature("foobar"), "Random feature");
ok(!ifr.featurePolicy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(!ifr.policy.allowsFeature("foobar"), "Random feature");
ok(!ifr.policy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(ifr.featurePolicy.allowsFeature("camera"), "Camera is allowed for self");
ok(ifr.featurePolicy.allowsFeature("camera", location.origin), "Camera is allowed for self");
ok(!ifr.featurePolicy.allowsFeature("camera", "http://foo.bar"), "Camera is not allowed for a random URL");
let allowed = ifr.featurePolicy.getAllowlistForFeature("camera");
ok(ifr.policy.allowsFeature("camera"), "Camera is allowed for self");
ok(ifr.policy.allowsFeature("camera", location.origin), "Camera is allowed for self");
ok(!ifr.policy.allowsFeature("camera", "http://foo.bar"), "Camera is not allowed for a random URL");
let allowed = ifr.policy.getAllowlistForFeature("camera");
is(allowed.length, 1, "Only 1 entry in allowlist for camera");
is(allowed[0], location.origin, "allowlist is 'self'");
ok(ifr.featurePolicy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.featurePolicy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.featurePolicy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for any random URL");
allowed = ifr.featurePolicy.getAllowlistForFeature("geolocation");
ok(ifr.policy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.policy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.policy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for any random URL");
allowed = ifr.policy.getAllowlistForFeature("geolocation");
is(allowed.length, 1, "Only 1 entry in allowlist for geolocation");
is(allowed[0], "*", "allowlist is '*'");
ok(!ifr.featurePolicy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://example.com"), "Microphone is disabled for example.com");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://example.org"), "Microphone is disabled for example.org");
allowed = ifr.featurePolicy.getAllowlistForFeature("microphone");
ok(!ifr.policy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.policy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.policy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.policy.allowsFeature("microphone", "http://example.com"), "Microphone is disabled for example.com");
ok(!ifr.policy.allowsFeature("microphone", "http://example.org"), "Microphone is disabled for example.org");
allowed = ifr.policy.getAllowlistForFeature("microphone");
is(allowed.length, 0, "No allowlist for microphone");
ok(!ifr.featurePolicy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.featurePolicy.getAllowlistForFeature("vr");
ok(!ifr.policy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.policy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.policy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.policy.getAllowlistForFeature("vr");
is(allowed.length, 0, "No allowlist for vr");
ok(ifr.featurePolicy.allowedFeatures().includes("camera"), "Camera is allowed");
ok(ifr.featurePolicy.allowedFeatures().includes("geolocation"), "Geolocation is allowed");
ok(ifr.policy.allowedFeatures().includes("camera"), "Camera is allowed");
ok(ifr.policy.allowedFeatures().includes("geolocation"), "Geolocation is allowed");
// microphone is disabled for this origin
ok(!ifr.featurePolicy.allowedFeatures().includes("microphone"), "microphone is not allowed");
ok(!ifr.policy.allowedFeatures().includes("microphone"), "microphone is not allowed");
// vr is disabled everywhere.
ok(!ifr.featurePolicy.allowedFeatures().includes("vr"), "VR is not allowed");
ok(!ifr.policy.allowedFeatures().includes("vr"), "VR is not allowed");
next();
}
function test_iframe_with_allow() {
info("Checking HTMLIFrameElement.featurePolicy");
info("Checking HTMLIFrameElement.policy");
let ifr = document.getElementById("ifr");
ok("featurePolicy" in ifr, "HTMLIFrameElement.featurePolicy exists");
ok("policy" in ifr, "HTMLIFrameElement.policy exists");
ifr.setAttribute("allow", "camera 'none'");
ok(!ifr.featurePolicy.allowsFeature("foobar"), "Random feature");
ok(!ifr.featurePolicy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(!ifr.policy.allowsFeature("foobar"), "Random feature");
ok(!ifr.policy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(!ifr.featurePolicy.allowsFeature("camera"), "Camera is not allowed");
let allowed = ifr.featurePolicy.getAllowlistForFeature("camera");
ok(!ifr.policy.allowsFeature("camera"), "Camera is not allowed");
let allowed = ifr.policy.getAllowlistForFeature("camera");
is(allowed.length, 0, "Camera has an empty allowlist");
ok(ifr.featurePolicy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.featurePolicy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.featurePolicy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for all");
allowed = ifr.featurePolicy.getAllowlistForFeature("geolocation");
ok(ifr.policy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.policy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.policy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for all");
allowed = ifr.policy.getAllowlistForFeature("geolocation");
is(allowed.length, 1, "Only 1 entry in allowlist for geolocation");
is(allowed[0], "*", "allowlist is '*'");
ok(!ifr.featurePolicy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://example.com"), "Microphone is disabled for example.com");
ok(!ifr.featurePolicy.allowsFeature("microphone", "http://example.org"), "Microphone is disabled for example.org");
allowed = ifr.featurePolicy.getAllowlistForFeature("microphone");
ok(!ifr.policy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.policy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.policy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.policy.allowsFeature("microphone", "http://example.com"), "Microphone is disabled for example.com");
ok(!ifr.policy.allowsFeature("microphone", "http://example.org"), "Microphone is disabled for example.org");
allowed = ifr.policy.getAllowlistForFeature("microphone");
is(allowed.length, 0, "No allowlist for microphone");
ok(!ifr.featurePolicy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.featurePolicy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.featurePolicy.getAllowlistForFeature("vr");
ok(!ifr.policy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.policy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.policy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.policy.getAllowlistForFeature("vr");
is(allowed.length, 0, "No allowlist for vr");
ok(ifr.featurePolicy.allowedFeatures().includes("geolocation"), "Geolocation is allowed only for self");
ok(ifr.policy.allowedFeatures().includes("geolocation"), "Geolocation is allowed only for self");
next();
}
function test_iframe_contentDocument() {
info("Checking iframe document.featurePolicy");
info("Checking iframe document.policy");
let ifr = document.createElement("iframe");
ifr.setAttribute("src", "empty.html");
ifr.onload = function() {
ok("featurePolicy" in ifr.contentDocument, "We have ifr.contentDocument.featurePolicy");
ok("policy" in ifr.contentDocument, "We have ifr.contentDocument.policy");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("foobar"), "Random feature");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(!ifr.contentDocument.policy.allowsFeature("foobar"), "Random feature");
ok(!ifr.contentDocument.policy.allowsFeature("foobar", "http://www.something.net"), "Random feature");
ok(ifr.contentDocument.featurePolicy.allowsFeature("camera"), "Camera is allowed for self");
ok(ifr.contentDocument.featurePolicy.allowsFeature("camera", location.origin), "Camera is allowed for self");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("camera", "http://foo.bar"), "Camera is allowed for self");
let allowed = ifr.contentDocument.featurePolicy.getAllowlistForFeature("camera");
ok(ifr.contentDocument.policy.allowsFeature("camera"), "Camera is allowed for self");
ok(ifr.contentDocument.policy.allowsFeature("camera", location.origin), "Camera is allowed for self");
ok(!ifr.contentDocument.policy.allowsFeature("camera", "http://foo.bar"), "Camera is allowed for self");
let allowed = ifr.contentDocument.policy.getAllowlistForFeature("camera");
is(allowed.length, 1, "Only 1 entry in allowlist for camera");
is(allowed[0], location.origin, "allowlist is 'self'");
ok(ifr.contentDocument.featurePolicy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.contentDocument.featurePolicy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.contentDocument.featurePolicy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for any random URL");
allowed = ifr.contentDocument.featurePolicy.getAllowlistForFeature("geolocation");
ok(ifr.contentDocument.policy.allowsFeature("geolocation"), "Geolocation is allowed for all");
ok(ifr.contentDocument.policy.allowsFeature("geolocation", location.origin), "Geolocation is allowed for all");
ok(ifr.contentDocument.policy.allowsFeature("geolocation", "http://foo.bar"), "Geolocation is allowed for any random URL");
allowed = ifr.contentDocument.policy.getAllowlistForFeature("geolocation");
is(allowed.length, 1, "Only 1 entry in allowlist for geolocation");
is(allowed[0], "*", "allowlist is '*'");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("microphone", "http://example.com"), "Microphone is allowed for example.com");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("microphone", "http://example.org"), "Microphone is allowed for example.org");
allowed = ifr.contentDocument.featurePolicy.getAllowlistForFeature("microphone");
ok(!ifr.contentDocument.policy.allowsFeature("microphone"), "Microphone is disabled for self");
ok(!ifr.contentDocument.policy.allowsFeature("microphone", location.origin), "Microphone is disabled for self");
ok(!ifr.contentDocument.policy.allowsFeature("microphone", "http://foo.bar"), "Microphone is disabled for foo.bar");
ok(!ifr.contentDocument.policy.allowsFeature("microphone", "http://example.com"), "Microphone is allowed for example.com");
ok(!ifr.contentDocument.policy.allowsFeature("microphone", "http://example.org"), "Microphone is allowed for example.org");
allowed = ifr.contentDocument.policy.getAllowlistForFeature("microphone");
is(allowed.length, 0, "No allowlist for microphone");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.contentDocument.featurePolicy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.contentDocument.featurePolicy.getAllowlistForFeature("vr");
ok(!ifr.contentDocument.policy.allowsFeature("vr"), "Vibrate is disabled for self");
ok(!ifr.contentDocument.policy.allowsFeature("vr", location.origin), "Vibrate is disabled for self");
ok(!ifr.contentDocument.policy.allowsFeature("vr", "http://foo.bar"), "Vibrate is disabled for foo.bar");
allowed = ifr.contentDocument.policy.getAllowlistForFeature("vr");
is(allowed.length, 0, "No allowlist for vr");
ok(ifr.contentDocument.featurePolicy.allowedFeatures().includes("camera"), "Camera is allowed");
ok(ifr.contentDocument.featurePolicy.allowedFeatures().includes("geolocation"), "Geolocation is allowed");
ok(ifr.contentDocument.policy.allowedFeatures().includes("camera"), "Camera is allowed");
ok(ifr.contentDocument.policy.allowedFeatures().includes("geolocation"), "Geolocation is allowed");
// microphone is disabled for this origin
ok(!ifr.contentDocument.featurePolicy.allowedFeatures().includes("microphone"), "Microphone is not allowed");
ok(!ifr.contentDocument.policy.allowedFeatures().includes("microphone"), "Microphone is not allowed");
// vr is disabled everywhere.
ok(!ifr.contentDocument.featurePolicy.allowedFeatures().includes("vr"), "VR is not allowed");
ok(!ifr.contentDocument.policy.allowedFeatures().includes("vr"), "VR is not allowed");
next();
};

View File

@@ -601,10 +601,10 @@ Document implements GeometryUtils;
Document implements FontFaceSource;
Document implements DocumentOrShadowRoot;
// https://w3c.github.io/webappsec-feature-policy/#idl-index
// https://wicg.github.io/feature-policy/#policy
partial interface Document {
[SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
readonly attribute FeaturePolicy featurePolicy;
readonly attribute Policy policy;
};
/**

View File

@@ -4,11 +4,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For more information on this interface, please see
* https://w3c.github.io/webappsec-feature-policy/#idl-index
* https://wicg.github.io/feature-policy/#policy
*/
[NoInterfaceObject]
interface FeaturePolicy {
interface Policy {
boolean allowsFeature(DOMString feature, optional DOMString origin);
sequence<DOMString> features();
sequence<DOMString> allowedFeatures();

View File

@@ -70,10 +70,10 @@ partial interface HTMLIFrameElement {
HTMLIFrameElement implements MozFrameLoaderOwner;
HTMLIFrameElement implements BrowserElement;
// https://w3c.github.io/webappsec-feature-policy/#idl-index
// https://wicg.github.io/feature-policy/#policy
partial interface HTMLIFrameElement {
[SameObject, Pref="dom.security.featurePolicy.webidl.enabled"]
readonly attribute FeaturePolicy featurePolicy;
readonly attribute Policy policy;
[CEReactions, SetterThrows, Pure, Pref="dom.security.featurePolicy.enabled"]
attribute DOMString allow;

View File

@@ -0,0 +1,4 @@
[encrypted-media-supported-by-feature-policy.tentative.html]
[document.featurePolicy.features should advertise encrypted-media.]
expected: FAIL

View File

@@ -9,3 +9,6 @@
[Verify that when 'layout-animations' is disabled, an 'element.animate' API including a keyframe that uses a blocked property generates violation report (inline scripts).]
expected: NOTRUN
[Verify 'layout-animations' is not in document's feature list.]
expected: FAIL

View File

@@ -5,3 +5,7 @@
[Verify that when 'layout-animations' is disabled, a keyframes which includes a blocked property generates violation report.]
expected: TIMEOUT
[Sanity-check: 'layout-animations' is not in document's feature list.]
expected: FAIL

View File

@@ -10,3 +10,4 @@
[Sanity-check: Contents do not load immediately (no eager-loading) when the loading attribute is 'lazy' and frame is in viewport.]
expected: FAIL

View File

@@ -2,5 +2,3 @@
[feature-propagation-to-auxiliary-context]
expected: FAIL
[Verify feature policies are inherited by the auxiliary browsing context if opened from a non-sandboxed same-origin <iframe>.]
expected: FAIL

View File

@@ -2,6 +2,3 @@
[sandbox-policies-in-allow-attribute]
expected: FAIL
[Verify that when a sandbox related feature is enabled in 'allow' then the feature will be enabled regardless of sandbox attribute's value.]
expected: FAIL

View File

@@ -0,0 +1,235 @@
[feature-policy-frame-policy-allowed-for-all.https.sub.html]
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc+ same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc+ cross origin iframe inherit from header policy.]
expected: FAIL

View File

@@ -1,9 +1,8 @@
[feature-policy-frame-policy-allowed-for-self.https.sub.html]
[Test frame policy on sandboxed iframe with no allow attribute.]
[Test frame policy on sandboxed iframe with allow="fullscreen https://www.web-platform.test:8443".]
expected: FAIL
[Test frame policy on sandboxed iframe with allow="fullscreen https://www.web-platform.test:8443".]
[Test frame policy on sandboxed iframe with no allow attribute.]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "*".]
@@ -11,3 +10,250 @@
[Test frame policy on data: URL origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + cross origin sandboxed iframe with allow="fullscreen".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on sandboxed srcdoc iframe with allow="fullscreen https://www.web-platform.test:8443".]
expected: FAIL
[Test frame policy on sandboxed iframe with allow="fullscreen".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on sandboxed iframe with allow="fullscreen 'src'".]
expected: FAIL
[Test frame policy on cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc sandboxed iframe with allow="fullscreen".]
expected: FAIL
[Test frame policy on srcdoc + same origin sandboxed iframe with allow="fullscreen".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on data: URL origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL

View File

@@ -1,7 +1,325 @@
[feature-policy-frame-policy-allowed-for-some.https.sub.html]
[Test frame policy on data: URL cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on another cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe inherit from header policy.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on another cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + another cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL

View File

@@ -0,0 +1,235 @@
[feature-policy-frame-policy-disallowed-for-all.https.sub.html]
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on srcdoc iframe inherit from header policy.]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on srcdoc iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'none'".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'none';".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe with allow = "*" and allowfullscreen.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'none'" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on srcdoc + cross origin iframe inherit from header policy.]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and header policy = "Feature-Policy: fullscreen *;".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "'self' https://www.web-platform.test:8443 https://www.example.com" and allowfullscreen.]
expected: FAIL
[Test frame policy on srcdoc + same origin iframe with allow = "'self'".]
expected: FAIL
[Test frame policy on data: URL cross origin iframe with allow = "*".]
expected: FAIL
[Test frame policy on same origin iframe with allow = "*" and header policy = "Feature-Policy: fullscreen 'self';".]
expected: FAIL
[Test frame policy on cross origin iframe with allow = "'self'".]
expected: FAIL

View File

@@ -0,0 +1,16 @@
[feature-policy-header-policy-allowed-for-all.https.sub.html]
[Feature-Policy: fullscreen * -- test fullscreen is allowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen * -- test fullscreen is allowed on cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen *, iframe.allow = fullscreen 'self'; -- test fullscreen is disallowed on cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen *, iframe.allow = fullscreen 'self'; -- test fullscreen is allowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen *NaN]
expected: FAIL

View File

@@ -0,0 +1,16 @@
[feature-policy-header-policy-allowed-for-self.https.sub.html]
[Feature-Policy: fullscreen 'self' -- test allowlist is [same_origin\]]
expected: FAIL
[Feature-Policy: fullscreen 'self', iframe.allow = fullscreen 'src'; -- test fullscreen is allowed on cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self', iframe.allow = fullscreen 'src'; -- test fullscreen is allowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' -- test fullscreen is disallowed on cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' -- test fullscreen is allowed on same-origin subframe]
expected: FAIL

View File

@@ -0,0 +1,19 @@
[feature-policy-header-policy-allowed-for-some.https.sub.html]
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;, iframe.allow = fullscreen 'none'; -- test fullscreen is disallowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is disallowed on cross-origin https://www1.web-platform.test:8443/feature-policy/resources/feature-policy-allowedfeatures.html subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test allowlist is [same_origin, cross_origin, https://www.example.com\]]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is allowed on cross-origin https://www.web-platform.test:8443/feature-policy/resources/feature-policy-allowedfeatures.html subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is allowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;iframe.allow = fullscreen 'none'; -- test fullscreen is disallowed on cross-origin subframe]
expected: FAIL

View File

@@ -1,3 +1,25 @@
[feature-policy-header-policy-declined.https.sub.html]
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test allowlist is [cross_origin, https://www.example.com\]]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;, iframe.allow = fullscreen https://www.web-platform.test:8443 -- test fullscreen is disallowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;, iframe.allow = fullscreen 'none'; -- test fullscreen is disallowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is disallowed on cross-origin https://www1.web-platform.test:8443/feature-policy/resources/feature-policy-allowedfeatures.html subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;iframe.allow = fullscreen https://www.web-platform.test:8443 -- test fullscreen is allowed on specific cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com;iframe.allow = fullscreen 'none'; -- test fullscreen is allowed on specific cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is allowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'self' https://www.web-platform.test:8443 https://www.example.com; -- test fullscreen is allowed on cross-origin https://www.web-platform.test:8443/feature-policy/resources/feature-policy-allowedfeatures.html subframe]
expected: FAIL

View File

@@ -0,0 +1,16 @@
[feature-policy-header-policy-disallowed-for-all.https.sub.html]
[Feature-Policy: fullscreen 'none' -- test fullscreen is disallowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'none' -- test allowlist is [\]]
expected: FAIL
[Feature-Policy: fullscreen 'none', iframe.allow = fullscreen 'src'; -- test fullscreen is disallowed on cross-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'none', iframe.allow = fullscreen 'src'; -- test fullscreen is disallowed on same-origin subframe]
expected: FAIL
[Feature-Policy: fullscreen 'none' -- test fullscreen is disallowed on cross-origin subframe]
expected: FAIL

View File

@@ -0,0 +1,19 @@
[feature-policy-nested-header-policy-allowed-for-all.https.sub.html]
[Test nested header policy with remote iframe on policy "fullscreen *"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen *"]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen 'self'"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'self'"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'none'"]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen 'none'"]
expected: FAIL

View File

@@ -0,0 +1,19 @@
[feature-policy-nested-header-policy-allowed-for-self.https.sub.html]
[Test nested header policy with remote iframe on policy "fullscreen *"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen *"]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen 'self'"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'self'"]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'none'"]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen 'none'"]
expected: FAIL

View File

@@ -0,0 +1,19 @@
[feature-policy-nested-header-policy-disallowed-for-all.https.sub.html]
[Test nested header policy with remote iframe on policy "fullscreen 'self'".]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'self'".]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen *".]
expected: FAIL
[Test nested header policy with local iframe on policy "fullscreen 'none'".]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen 'none'".]
expected: FAIL
[Test nested header policy with remote iframe on policy "fullscreen *".]
expected: FAIL

View File

@@ -0,0 +1,31 @@
[idlharness.window.html]
[HTMLIFrameElement interface: attribute featurePolicy]
expected: FAIL
[Document interface: attribute featurePolicy]
expected: FAIL
[Document interface: document must inherit property "featurePolicy" with the proper type]
expected: FAIL
[FeaturePolicy interface: document.featurePolicy must inherit property "allowsFeature(DOMString, DOMString)" with the proper type]
expected: FAIL
[FeaturePolicy interface: document.featurePolicy must inherit property "getAllowlistForFeature(DOMString)" with the proper type]
expected: FAIL
[FeaturePolicy interface: document.featurePolicy must inherit property "allowedFeatures()" with the proper type]
expected: FAIL
[FeaturePolicy interface: calling getAllowlistForFeature(DOMString) on document.featurePolicy with too few arguments must throw TypeError]
expected: FAIL
[Stringification of document.featurePolicy]
expected: FAIL
[FeaturePolicy interface: calling allowsFeature(DOMString, DOMString) on document.featurePolicy with too few arguments must throw TypeError]
expected: FAIL
[FeaturePolicy interface: document.featurePolicy must inherit property "features()" with the proper type]
expected: FAIL

View File

@@ -1,3 +1,6 @@
[payment-supported-by-feature-policy.tentative.html]
disabled:
if (os == "android") or not nightly_build: https://bugzilla.mozilla.org/show_bug.cgi?id=1549241
[document.featurePolicy.features should advertise payment.]
expected: FAIL

View File

@@ -0,0 +1,4 @@
[GeolocationSensor-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise geolocation.]
expected: FAIL

View File

@@ -0,0 +1,4 @@
[autoplay-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise autoplay.]
expected: FAIL

View File

@@ -0,0 +1,7 @@
[MediaStream-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise microphone.]
expected: FAIL
[document.featurePolicy.features should advertise camera.]
expected: FAIL

View File

@@ -1,3 +1,7 @@
[webvr-supported-by-feature-policy.html]
[document.featurePolicy.features should advertise xr.]
expected: FAIL
[document.featurePolicy.features should advertise (obsolete) vr.]
expected: FAIL