Index: third_party/WebKit/LayoutTests/presentation/presentation-request-sandbox-success.html |
diff --git a/third_party/WebKit/LayoutTests/presentation/presentation-request-sandbox-success.html b/third_party/WebKit/LayoutTests/presentation/presentation-request-sandbox-success.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..636fe20494775a40d1e51ea27b6350814dea6a13 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/presentation/presentation-request-sandbox-success.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<iframe sandbox="allow-scripts allow-presentation"></iframe> |
+<script> |
+ |
+var iframe = document.querySelector('iframe'); |
+ |
+async_test(t => { |
+ iframe.onload = t.step_func(() => { |
+ iframe.contentWindow.postMessage('create', '*'); |
+ }); |
+ |
+ window.addEventListener("message", t.step_func_done(e => { |
+ assert_equals(e.data, 'success'); |
+ })); |
+ |
+ // Navigate the iframe |
+ iframe.src = 'resources/iframe-sandbox.html'; |
+}, "Test that creating PresentationRequest succeeds if 'allow-presentation' keyword is present."); |
+ |
+</script> |
+</body> |
+</html> |