Files
sousa-gecko/testing/web-platform/tests/fenced-frame/disallowed-navigation-to-data.https.html
T
Hubert Chao 08ed6b19f8 Bug 1986565 [wpt PR 54652] - [LNA] remove PNA WPT tests, a=testonly
Automatic update from web-platform-tests
[LNA] remove PNA WPT tests

Private Network Access (PNA) has been replaced by Local Network
Access(LNA)

BUG=435479021,435443082,435479020,435443081,435443080,406991278

Change-Id: Ia8336581dec0ecf9b63188531038c908576264f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6906920
Reviewed-by: Mason Freed <masonf@chromium.org>
Commit-Queue: Hubert Chao <hchao@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1509911}

--

wpt-commits: 0031a2ca6cbab72063c695e5a0edcb2cd948c1f4
wpt-pr: 54652
2025-09-08 14:27:31 +00:00

36 lines
1.3 KiB
HTML

<!DOCTYPE html>
<title>Fenced frame disallowed navigations to data: URL</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/utils.js"></script>
<script src="resources/utils.js"></script>
<script src="/fetch/local-network-access/resources/support.sub.js"></script>
<body>
<script>
const kPublicUtils = resolveUrl("resources/utils.js", Server.HTTPS_PUBLIC);
function getTimeoutPromise(t) {
return new Promise(resolve =>
t.step_timeout(() => resolve("NOT LOADED"), 2000));
}
// The following tests ensure that an embedder cannot navigate a
// `mode=opaque-ads` fenced frame to an opaque URN or a fenced frame config
// object that represents a data: URL
for (const resolve_to_config of [true, false]) {
promise_test(async t => {
const key = token();
const select_url_result = await
runSelectURL(`data:text/html, ${createLocalSource(key, kPublicUtils)}`);
attachFencedFrame(select_url_result);
const loaded_promise = nextValueFromServer(key);
const result = await Promise.any([loaded_promise, getTimeoutPromise(t)]);
assert_equals(result, "NOT LOADED");
}, "fenced frame " + (resolve_to_config ? "config" : "urn:uuid") +
" => data: URL");
}
</script>
</body>