Index: third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy.html b/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..13a7112406c7dcfd5b037744824a22ec8174d13d |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.dumpChildFramesAsText(); |
+} |
+ |
+function loaded() { |
+ var iframes = document.getElementsByTagName('iframe'); |
+ for (var i = 0; i < iframes.length; ++i) { // < 1; ++i) { // |
+ var iframe = iframes[i]; |
+ // The iframe uses eventSender to emulate a user navigatation, which requires absolute coordinates. |
+ iframe.contentWindow.postMessage({x: iframe.offsetLeft, y: iframe.offsetTop}, "*"); |
+ } |
+} |
+</script> |
+</head> |
+<body onload="loaded();"> |
+<iframe id="f1" src="resources/feature-policy-vibrate-enabled.html" allow="vibrate"></iframe> |
+<iframe id="f2" src="http://localhost:8000/feature-policy/feature-policy-vibrate-enabled.html" allow="vibrate"></iframe> |
+</body> |
+</html> |