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

Unified Diff: third_party/WebKit/LayoutTests/presentation/resources/iframe-sandbox.html

Issue 2780583003: [Presentation API] Move sandbox check to PresentationRequest ctor (Closed)
Patch Set: add layout test 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/resources/iframe-sandbox.html
diff --git a/third_party/WebKit/LayoutTests/presentation/resources/iframe-sandbox.html b/third_party/WebKit/LayoutTests/presentation/resources/iframe-sandbox.html
new file mode 100644
index 0000000000000000000000000000000000000000..a3a05b9b443acb12c7ba369a20b4aaabec67eba4
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/presentation/resources/iframe-sandbox.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script>
+
+window.onmessage = function (ev) {
+ var request = null;
+ if (ev.data === 'create') {
+ try {
+ request = new PresentationRequest("https://example.com/");
+ parent.window.postMessage('success', '*');
+ }
+ catch (err) {
+ parent.window.postMessage(err.name, '*');
+ }
+ }
+}
+
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698