blob: 6abf7bd2ef95383c1f3e036c6ee2d5e5540a0252 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="/js-test-resources/js-test.js"></script>
<script>
description("Tests that third-party iframes can request access to device motion events if allowed by feature policy.");
jsTestIsAsync = true;
// If prompted, allow.
if (window.testRunner)
testRunner.setShouldAllowDeviceOrientationAndMotionAccess(true);
onmessage = (_e) => {
e = _e;
shouldBeEqualToString("e.data", "granted");
finishJSTest();
};
</script>
<iframe src="http://localhost:8000/device-orientation/resources/request-motion-events.html" allow="accelerometer;gyroscope"></iframe>
</body>
</html>