Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444

This commit is contained in:
Josh Matthews 2017-04-17 12:06:02 +10:00 committed by Anthony Ramine
parent 25e8bf69e6
commit 665817d2a6
35333 changed files with 1818077 additions and 16036 deletions

View file

@ -6,13 +6,13 @@ Test from https://bugzilla.mozilla.org/show_bug.cgi?id=819051
<title>XMLHttpRequest: setRequestHeader() and open()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method" data-tested-assertations="following::OL[1]/LI[14]/ul[1]/li[4]" />
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method" data-tested-assertations="following::OL[1]/LI[6] following::ol[1]/li[7]" />
<link rel="help" href="https://xhr.spec.whatwg.org/#the-open()-method">
<link rel="help" href="https://xhr.spec.whatwg.org/#the-setrequestheader()-method">
</head>
<body>
<p id="log"></p>
<script type="text/javascript">
var test = async_test();
async_test(test => {
var url = "resources/inspect-headers.py";
@ -22,14 +22,12 @@ xhr.setRequestHeader("X-appended-to-this", "False");
xhr.open("GET", url + "?filter_name=x-appended-to-this");
xhr.setRequestHeader("X-appended-to-this", "True");
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
test.step(function (){
assert_equals(xhr.responseText, "x-appended-to-this: True\n", "Set headers record should have been cleared by open.");
test_standard_header();
});
xhr.onreadystatechange = test.step_func(() => {
if (xhr.readyState == 4) {
assert_equals(xhr.responseText, "X-appended-to-this: True\n", "Set headers record should have been cleared by open.");
test_standard_header();
}
}
})
xhr.send();
@ -41,20 +39,15 @@ function test_standard_header () {
xhr.open("GET", url + "?filter_name=accept");
xhr.setRequestHeader("Accept", "bar/foo");
xhr.onreadystatechange = function() {
if (this.readyState == 4) {
test.step(function (){
assert_equals(xhr.responseText, "accept: bar/foo\n", "Set headers record should have been cleared by open.");
test.done();
});
xhr.onreadystatechange = test.step_func(() => {
if (xhr.readyState == 4) {
assert_equals(xhr.responseText, "Accept: bar/foo\n", "Set headers record should have been cleared by open.");
test.done();
}
}
})
xhr.send();
}
})
</script>
</pre>
</body>
</html>