summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/webappapis/user-prompts/cannot-show-simple-dialogs/prompt-different-origin-frame.sub.html
blob: 151def9b5a5a9dd223b6ee14758140a132ad25b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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>