blob: 13c1351c933c6389c73380ae5c90af69e6632c1e [file] [log] [blame]
<html>
<body>
<!--This test is specific to Chromium, so it will not be ported to WPT.-->
<p>Test that 'Save-Data' header is treated as a simple header and preflight request is not created. Should print PASS.</p>
<div id="log"></div>
<script>
internals.setSaveDataEnabled(true);
function log(message) {
document.getElementById("log").innerHTML += message + "<br>";
}
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://localhost:8000/xmlhttprequest/chromium/resources/access-control-preflight-request-invalid-status.php?code=400");
xhr.onerror = function () {
log("FAIL");
if (window.testRunner)
testRunner.notifyDone();
};
xhr.onload = function () {
log("PASS");
if (window.testRunner)
testRunner.notifyDone();
};
xhr.send();
</script>
</body>
</html>