<!DOCTYPE html><metacharset="utf-8"><scriptsrc="/resources/testharness.js"></script><scriptsrc="/resources/testharnessreport.js"></script><scriptsrc="/cors/support.js?pipe=sub"></script><linkrel="help"href="https://html.spec.whatwg.org/#unhandled-promise-rejections"><linkrel="help"href="https://html.spec.whatwg.org/#muted-errors"><body><script>'use strict';setup({allow_uncaught_exception:true});async_test(function(t){addEventListener('unhandledrejection',t.step_func(function(e){assert_equals(e.reason,42,'reason should be the one given by the script');t.done();}));},'Promise rejection event should be received for the cross-origin CORS script');(function(){varscriptEl=document.createElement('script');scriptEl.src=CROSSDOMAIN+'support/promise-access-control.py?allow=true';scriptEl.crossOrigin='anonymous';document.body.appendChild(scriptEl);}());</script></body>