Commit 256b7f7c authored by Ian Clelland's avatar Ian Clelland Committed by Commit Bot

Use allow attribute for delegation in generic sensor WPT

With an upcoming change to Feature/Permissions Policy, the header
alone will no longer be sufficient to delegate permissions to use
powerful features in subframes. The iframe allow attribute must
be used in conjunction with it. The header can still be used to
block delegation.

This change updates the generic sensor WPTs to use the allow
attribute for delegation.

Bug: 1095641
Change-Id: I7ba5512c755816e5072dcb4aade3e13f4904456f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2424654
Commit-Queue: Ian Clelland <iclelland@chromium.org>
Auto-Submit: Ian Clelland <iclelland@chromium.org>
Reviewed-by: default avatarCharlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#809845}
parent b76e918d
......@@ -72,13 +72,16 @@ function run_fp_tests_enabled(sensorName) {
);
}, `${sensorName}: ${header} allows same-origin iframes.`);
// Set allow="feature;feature;..." on iframe element to delegate features
// under test to cross origin subframe.
async_test(t => {
assert_implements(sensorName in self, `${sensorName} is not supported.`);
test_feature_availability(
desc,
t,
cross_origin_src + sensorName,
expect_feature_available_default
expect_feature_available_default,
feature_policies[sensorName].join(";")
);
}, `${sensorName}: ${header} allows cross-origin iframes.`);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment