Revision e803257f327d543467241723edd21215fbcb2fc3 authored by Tom Anderson on 30 March 2018, 19:57:10 UTC, committed by Chromium WPT Sync on 30 March 2018, 19:57:10 UTC
BUG=787020
TBR=dpranke,asvitkine

Change-Id: I38740d1ee9fe621eabd5416f1a87b23a71fbb7e7
Reviewed-on: https://chromium-review.googlesource.com/986812
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547246}
1 parent 067f918
Raw File
send-accept.htm
<!doctype html>
<html>
  <head>
    <title>XMLHttpRequest: send() - Accept</title>
    <script src="/resources/testharness.js"></script>
    <script src="/resources/testharnessreport.js"></script>
    <link rel="help" href="https://xhr.spec.whatwg.org/#the-send()-method" data-tested-assertations="following::code[contains(text(),'*/*')]/.. following::code[contains(text(),'Accept')]/.. following::code[contains(text(),'Accept')]/../following::ul[1]/li[1]" />
  </head>
  <body>
    <div id="log"></div>
    <script>
      test(function() {
        var client = new XMLHttpRequest()
        client.open("GET", "resources/accept.py", false)
        client.send(null)
        assert_equals(client.responseText, "*/*")
        client.open("GET", "resources/accept.py", false)
        client.setRequestHeader("Accept", "x-something/vague, text/html5")
        client.send(null)
        assert_equals(client.responseText, "x-something/vague, text/html5")
      })
    </script>
  </body>
</html>
back to top