mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
32 lines
914 B
HTML
32 lines
914 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for XHR header preservation</title>
|
|
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
</head>
|
|
<body>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
|
|
</div>
|
|
<pre id="test">
|
|
<script class="testbody" type="text/javascript">
|
|
/** Test for Bug 421622 **/
|
|
const SJS_URL = "http://mochi.test:8888/tests/content/base/test/header.sjs";
|
|
const VALUE = "http://www.mozilla.org/";
|
|
|
|
var req = new XMLHttpRequest();
|
|
req.open("GET", SJS_URL, false);
|
|
req.setRequestHeader("SomeHeader", VALUE);
|
|
req.send(null);
|
|
|
|
is(req.responseText,
|
|
"SomeHeader: " + VALUE,
|
|
"Header received by server does not match what was set");
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|