Index: third_party/WebKit/LayoutTests/presentation/presentation-request-iframe-default-success.html |
diff --git a/third_party/WebKit/LayoutTests/presentation/presentation-request-iframe-default-success.html b/third_party/WebKit/LayoutTests/presentation/presentation-request-iframe-default-success.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3ed8831a0399b3ac46448fed7aa985f2a7f75657 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/presentation/presentation-request-iframe-default-success.html |
@@ -0,0 +1,26 @@ |
+<!DOCTYPE html> |
+<html> |
+<body> |
+<script src="../resources/testharness.js"></script> |
+<script src="../resources/testharnessreport.js"></script> |
+<iframe></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 when the iframe is not sandboxed."); |
+ |
+</script> |
+</body> |
+</html> |