| <!DOCTYPE html> |
| <script src=/resources/testharness.js></script> |
| <script src=/resources/testharnessreport.js></script> |
| <body> |
| |
| <script> |
| 'use strict'; |
| |
| promise_test(async t => { |
| const messageWatcher = new EventWatcher(t, window, "message"); |
| var iframe = document.createElement("iframe"); |
| iframe.src = "resources/iframe.html" |
| document.body.appendChild(iframe); |
| |
| const message = await messageWatcher.wait_for("message"); |
| assert_equals(message.data.errorType, "NotAllowedError"); |
| |
| }, "Test SMSReceiver API disabled in iframes"); |
| |
| </script> |
| </body> |