Bug 1073882 - XMLHttpRequest.prototype.responseURL should not have fragment per latest spec. r=smaug

This commit is contained in:
xKhorasan 2014-09-28 08:51:23 +09:00
parent 354e4e51c6
commit 84322f8ddd
2 changed files with 6 additions and 1 deletions

View File

@ -1090,7 +1090,7 @@ nsXMLHttpRequest::GetResponseURL(nsAString& aUrl)
}
nsAutoCString temp;
responseUrl->GetSpec(temp);
responseUrl->GetSpecIgnoringRef(temp);
CopyUTF8toUTF16(temp, aUrl);
}

View File

@ -189,6 +189,11 @@ function testSuccessResponse() {
skip: isInWorker(),
reason: "cross-origin redirect request not works on Workers, see bug 882458"
},
{
message: "request URL has fragment",
requestURL: "http://mochi.test:8888/tests/content/base/test/file_XHRResponseURL.text#fragment",
responseURL: "http://mochi.test:8888/tests/content/base/test/file_XHRResponseURL.text"
},
// tests for non-http(s) URL
{