Title: [251542] trunk
Revision
251542
Author
you...@apple.com
Date
2019-10-24 09:24:00 -0700 (Thu, 24 Oct 2019)

Log Message

XMLHttpRequest.responseXML url should be the HTTP response URL
https://bugs.webkit.org/show_bug.cgi?id=203289

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt:
* web-platform-tests/xhr/responsexml-document-properties-expected.txt:

Source/WebCore:

Follow https://xhr.spec.whatwg.org/#document-response step 9.
Covered by rebased tests.

* xml/XMLHttpRequest.cpp:

Modified Paths

Diff

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (251541 => 251542)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-24 16:12:48 UTC (rev 251541)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2019-10-24 16:24:00 UTC (rev 251542)
@@ -1,3 +1,13 @@
+2019-10-24  youenn fablet  <you...@apple.com>
+
+        XMLHttpRequest.responseXML url should be the HTTP response URL
+        https://bugs.webkit.org/show_bug.cgi?id=203289
+
+        Reviewed by Chris Dumez.
+
+        * web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt:
+        * web-platform-tests/xhr/responsexml-document-properties-expected.txt:
+
 2019-10-24  Antoine Quint  <grao...@apple.com>
 
         [Web Animations] Update WPT tests related to Web Animations and remove imported Mozilla tests

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt (251541 => 251542)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt	2019-10-24 16:12:48 UTC (rev 251541)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/xhr-response-url.https-expected.txt	2019-10-24 16:24:00 UTC (rev 251542)
@@ -2,7 +2,7 @@
 PASS global setup 
 PASS XHR responseURL should be the response URL 
 PASS XHR responseURL should be the response URL (generated response) 
-FAIL XHR Document should use the response URL assert_equals: responseXML.URL expected "https://localhost:9443/service-workers/service-worker/resources/blank.html" but got "https://localhost:9443/service-workers/service-worker/test?respondWith=fetch&url=""
+PASS XHR Document should use the response URL 
 PASS XHR Document should use the response URL (generated response) 
 PASS global cleanup 
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/responsexml-document-properties-expected.txt (251541 => 251542)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/responsexml-document-properties-expected.txt	2019-10-24 16:12:48 UTC (rev 251541)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/xhr/responsexml-document-properties-expected.txt	2019-10-24 16:24:00 UTC (rev 251542)
@@ -13,8 +13,8 @@
 PASS doctype 
 FAIL all assert_equals: expected undefined but got [object HTMLAllCollection]
 PASS cookie 
-FAIL Test document URL properties after redirect assert_equals: expected "http://localhost:8800/xhr/resources/well-formed.xml" but got "http://localhost:8800/xhr/resources/redirect.py?location=well-formed.xml"
-FAIL Test document URL properties of document with <base> after redirect assert_equals: expected "http://localhost:8800/xhr/resources/base.xml" but got "http://localhost:8800/xhr/resources/redirect.py?location=base.xml"
+PASS Test document URL properties after redirect 
+PASS Test document URL properties of document with <base> after redirect 
 PASS lastModified set to time of response if no HTTP header provided 
 PASS lastModified set to related HTTP header if provided 
 PASS cookie (after setting it) 

Modified: trunk/Source/WebCore/ChangeLog (251541 => 251542)


--- trunk/Source/WebCore/ChangeLog	2019-10-24 16:12:48 UTC (rev 251541)
+++ trunk/Source/WebCore/ChangeLog	2019-10-24 16:24:00 UTC (rev 251542)
@@ -1,3 +1,15 @@
+2019-10-24  youenn fablet  <you...@apple.com>
+
+        XMLHttpRequest.responseXML url should be the HTTP response URL
+        https://bugs.webkit.org/show_bug.cgi?id=203289
+
+        Reviewed by Chris Dumez.
+
+        Follow https://xhr.spec.whatwg.org/#document-response step 9.
+        Covered by rebased tests.
+
+        * xml/XMLHttpRequest.cpp:
+
 2019-10-24  Antti Koivisto  <an...@apple.com>
 
         Move property cascade out of StyleResolver

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (251541 => 251542)


--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2019-10-24 16:12:48 UTC (rev 251541)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2019-10-24 16:24:00 UTC (rev 251542)
@@ -184,9 +184,9 @@
             m_responseDocument = nullptr;
         } else {
             if (isHTML)
-                m_responseDocument = HTMLDocument::create(nullptr, m_url);
+                m_responseDocument = HTMLDocument::create(nullptr, m_response.url());
             else
-                m_responseDocument = XMLDocument::create(nullptr, m_url);
+                m_responseDocument = XMLDocument::create(nullptr, m_response.url());
             m_responseDocument->overrideLastModified(m_response.lastModified());
             m_responseDocument->setContent(m_responseBuilder.toStringPreserveCapacity());
             m_responseDocument->setContextDocument(context);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to