Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(676)

Unified Diff: third_party/WebKit/LayoutTests/presentation/presentation-request-iframe-default-success.html

Issue 2782663002: [Presentation API] Move sandbox check to PresentationRequest constructor. (Closed)
Patch Set: Replace previous iframe tests with simpler ones. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698