Revision cd5bb894656e15405f1ab638cda9b24608e19f86 authored by Geoffrey Sneddon on 30 April 2018, 13:10:40 UTC, committed by Geoffrey Sneddon on 30 April 2018, 13:10:40 UTC
1 parent 2c46f38
Raw File
access-control-basic-allow.htm
<!DOCTYPE html>
<html>
  <head>
    <title>Tests CORS with Access-Control-Allow-Origin header</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <script src="/common/get-host-info.sub.js"></script>
  </head>
  <body>
    <script type="text/javascript">
    test(function() {
      const xhr = new XMLHttpRequest;

      xhr.open("GET", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/access-control-basic-allow.py", false);

      xhr.send();

      assert_equals(xhr.responseText, "PASS: Cross-domain access allowed.");
    }, "Allow basic");
    </script>
  </body>
</html>
back to top