Backed out 3 changesets (bug 1514474, bug 1514296) for mochitest failures on test_featureList.html. CLOSED TREE

Backed out changeset 52ae606e4cfa (bug 1514296)
Backed out changeset e74168e44dd7 (bug 1514474)
Backed out changeset a43f3aa0ea77 (bug 1514296)
This commit is contained in:
Cosmin Sabou 2019-07-03 17:29:15 +03:00
Родитель e14e57c33f
Коммит 56754efbdb
31 изменённых файлов: 1332 добавлений и 184 удалений

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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()) {

Просмотреть файл

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

Просмотреть файл

@ -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,
@ -148,16 +148,6 @@ bool FeaturePolicy::AllowsFeatureInternal(const nsAString& aFeatureName,
return false;
}
void FeaturePolicy::Features(nsTArray<nsString>& aFeatures) {
RefPtr<FeaturePolicy> self = this;
FeaturePolicyUtils::ForEachFeature(
[self, &aFeatures](const char* aFeatureName) {
nsString featureName;
featureName.AppendASCII(aFeatureName);
aFeatures.AppendElement(featureName);
});
}
void FeaturePolicy::AllowedFeatures(nsTArray<nsString>& aAllowedFeatures) {
RefPtr<FeaturePolicy> self = this;
FeaturePolicyUtils::ForEachFeature(

Просмотреть файл

@ -113,8 +113,6 @@ class FeaturePolicy final : public nsISupports, public nsWrapperCache {
bool AllowsFeature(const nsAString& aFeatureName,
const Optional<nsAString>& aOrigin) const;
void Features(nsTArray<nsString>& aFeatures);
void AllowedFeatures(nsTArray<nsString>& aAllowedFeatures);
void GetAllowlistForFeature(const nsAString& aFeatureName,

Просмотреть файл

@ -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())) {

Просмотреть файл

@ -8,4 +8,3 @@ support-files =
test_parser.html^headers^
[test_parser.html]
[test_featureList.html]

Просмотреть файл

@ -1,41 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test feature policy - list</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<iframe src="empty.html" id="ifr"></iframe>
<script type="text/javascript">
let supportedFeatures = [
"autoplay",
"camera",
"encrypted-media",
"fullscreen",
"geolocation",
"microphone",
"midi",
"payment",
"document-domain",
"speaker",
"vr",
];
function checkFeatures(features) {
features.forEach(feature => {
ok(supportedFeatures.includes(feature), "Feature: " + feature);
});
}
ok("featurePolicy" in document, "We have document.featurePolicy");
checkFeatures(document.featurePolicy.features());
let ifr = document.getElementById("ifr");
ok("featurePolicy" in ifr, "We have HTMLIFrameElement.featurePolicy");
checkFeatures(ifr.featurePolicy.features());
</script>
</body>
</html>

Просмотреть файл

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

Просмотреть файл

@ -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;
};
/**

Просмотреть файл

@ -4,13 +4,12 @@
* 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();
sequence<DOMString> getAllowlistForFeature(DOMString feature);
};

Просмотреть файл

@ -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;

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -11,5 +11,3 @@
[Sanity-check: Contents do not load immediately (no eager-loading) when the loading attribute is 'lazy' and frame is in viewport.]
expected: FAIL
[When 'lazyload' feature is enabled, a frame can avoid lazyloading by setting 'loading' attribute to 'eager']
expected: FAIL

Просмотреть файл

@ -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

Просмотреть файл

@ -1,9 +1,4 @@
[sandbox-policies-in-allow-attribute.html]
expected: ERROR
[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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -1,4 +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