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..06d9fd43e67cb7abc9691471fd4586157f9ae6f1 |
--- /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 => { |
imcheng
2017/03/28 20:24:32
nit: use single quote to be consistent here and be
mark a. foltz
2017/03/28 21:40:11
Done.
|
+ 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> |