summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html')
-rw-r--r--testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html b/testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html
new file mode 100644
index 0000000000..151def9b5a
--- /dev/null
+++ b/testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html
@@ -0,0 +1,24 @@
+<html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+ setup({ single_test: true });
+ function handleEvent(e) {
+ assert_equals(e.data, 'pass');
+ done();
+ }
+ function on_iframe_load() {
+ var frameWin = document.getElementById('promptFrame').contentWindow;
+ frameWin.postMessage('Prompt', '*');
+ }
+ window.addEventListener('message', handleEvent);
+</script>
+
+<body>
+ <iframe id='promptFrame'
+ src='http://{{hosts[alt][www]}}:{{ports[http][0]}}/html/webappapis/user-prompts/cannot-show-simple-dialogs/support/prompt.html'
+ onload='on_iframe_load()'></iframe>
+</body>
+
+</html>