mirror of
https://github.com/servo/servo.git
synced 2025-07-01 04:23:39 +01:00
22 lines
703 B
HTML
22 lines
703 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<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">
|
|
async_test(function(test) {
|
|
const xhr = new XMLHttpRequest;
|
|
|
|
xhr.open("GET", get_host_info().HTTP_REMOTE_ORIGIN + "/xhr/resources/access-control-origin-header.py", false);
|
|
xhr.send();
|
|
|
|
assert_equals(xhr.responseText, "PASS: Cross-domain access allowed.\n" +
|
|
"HTTP_ORIGIN: " + get_host_info().HTTP_ORIGIN);
|
|
test.done();
|
|
}, "Access control test with origin header");
|
|
</script>
|
|
</body>
|
|
</html>
|