Index: third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy-relocate-and-reload.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy-relocate-and-reload.html b/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy-relocate-and-reload.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a1926f92b142608aacd66f3b3bb1b43e2555de46 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy-experimental-features/vibrate-allowed-by-container-policy-relocate-and-reload.html |
@@ -0,0 +1,24 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
+<script src="resources/helper.js"></script> |
+<iframe src="about:blank" allow="vibrate"></iframe> |
+<script> |
+window.onload = function () { |
+ var iframe = document.querySelector('iframe'); |
+ var src = "http://localhost:8000/feature-policy-experimental-features/resources/feature-policy-vibrate.html"; |
+ iframe.addEventListener('load', sendClick); |
+ promise_test(function() { |
+ iframe.src = src; |
+ return new Promise(function(resolve, reject) { |
+ window.addEventListener('message', function(e) { |
+ if (e.data.type === 'result') { |
+ resolve(e.data); |
+ } |
+ }); |
+ }).then(function(data) { |
+ assert_true(data.enabled, 'navigator.vibrate():'); |
+ }); |
+ }, 'Iframe src set to ' + src + ', is enabled by container policy.'); |
+} |
+</script> |