https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 0acd8f62f12e8ddafea77d57f425e68cc11e16b0 authored by mwatson2 on 26 October 2016, 04:11:11 UTC
[eme] Fix #4058: Correct expected order of closed promise resolutions (#4073)
Tip revision: 0acd8f6
open-url-base-inserted-after-open.htm
<!DOCTYPE html>
<html>
  <head>
    <title>XMLHttpRequest: open() resolving URLs - insert &lt;base> after 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/li[2]/ol/li[2] following::ol/li[7] following::ol/li[14]/ul/li[2]" />
    <link rel="help" href="https://xhr.spec.whatwg.org/#the-responsetext-attribute" data-tested-assertations="following::ol/li[4]" />
  </head>
  <body>
    <div id="log"></div>
    <script>
      test(function() {
        var client = new XMLHttpRequest(),
            base = document.createElement("base")
        base.href = location.href.replace(/\/[^/]*$/, '') + "/resources/"
        client.open("GET", "folder.txt", false)
        document.getElementsByTagName("head")[0].appendChild(base)
        client.send(null)
        assert_equals(client.responseText, "top\n")
      })
    </script>
  </body>
</html>
back to top