зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset fe8c2426d9d3 (bug 1514474) for causing beta simulation failures CLOSED TREE
This commit is contained in:
Родитель
ffc66bad70
Коммит
35fa9e2361
|
@ -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,
|
||||
|
|
|
@ -8,4 +8,3 @@ support-files =
|
|||
test_parser.html^headers^
|
||||
|
||||
[test_parser.html]
|
||||
[test_featureList.html]
|
||||
|
|
|
@ -1,42 +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",
|
||||
"display-capture",
|
||||
"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>
|
|
@ -10,7 +10,6 @@
|
|||
[NoInterfaceObject]
|
||||
interface Policy {
|
||||
boolean allowsFeature(DOMString feature, optional DOMString origin);
|
||||
sequence<DOMString> features();
|
||||
sequence<DOMString> allowedFeatures();
|
||||
sequence<DOMString> getAllowlistForFeature(DOMString feature);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче