Bug 1783944 - Add test for bug 1782211; r=ckerschb a=test-only

This commit is contained in:
Edgar Chen 2024-03-16 00:00:46 +00:00
parent 219e170c9a
commit 3f2c3b5b50
2 changed files with 27 additions and 0 deletions

View File

@ -9,3 +9,4 @@ support-files =
[test_parser.html]
fail-if = xorigin
[test_featureList.html]
[test_initial_aboutblank.html]

View File

@ -0,0 +1,26 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test feature policy - Initial about:blank</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 name="parentIframe" allow="fullscreen 'none'" srcdoc="
<iframe name='regular'></iframe>
<iframe name='transient'></iframe>
<script>transient.stop()</script>
"></iframe>
<script type="text/javascript">
add_task(function testAboutBlank() {
isDeeply(frames[0].transient.document.featurePolicy.allowedFeatures(),
frames[0].document.featurePolicy.allowedFeatures(),
"check allowed feature list for initial about:blank");
isDeeply(frames[0].regular.document.featurePolicy.allowedFeatures(),
frames[0].document.featurePolicy.allowedFeatures(),
"check allowed feature list for real load about:blank");
});
</script>
</body>
</html>