Zhenbo Li : mshtml: Add IHTMLXMLHttpRequest::responseText() method implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jul 22 13:40:42 CDT 2015


Module: wine
Branch: master
Commit: 4ea5d00e580a407953bc83a95f8d775a31095933
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4ea5d00e580a407953bc83a95f8d775a31095933

Author: Zhenbo Li <litimetal at gmail.com>
Date:   Wed Jul 22 23:33:50 2015 +0800

mshtml: Add IHTMLXMLHttpRequest::responseText() method implementation.

---

 dlls/mshtml/tests/xmlhttprequest.c |  6 +++---
 dlls/mshtml/xmlhttprequest.c       | 13 +++++++++++--
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dlls/mshtml/tests/xmlhttprequest.c b/dlls/mshtml/tests/xmlhttprequest.c
index a9a6a3c..db6aca4 100644
--- a/dlls/mshtml/tests/xmlhttprequest.c
+++ b/dlls/mshtml/tests/xmlhttprequest.c
@@ -647,9 +647,9 @@ static void test_async_xhr(IHTMLDocument2 *doc, const char *xml_url)
 
     text = NULL;
     hres = IHTMLXMLHttpRequest_get_responseText(xhr, &text);
-    todo_wine ok(hres == S_OK, "get_responseText failed: %08x\n", hres);
-    todo_wine ok(text != NULL, "test == NULL\n");
-    todo_wine ok(!strcmp_wa(text, EXPECT_RESPONSE_TEXT), "expect %s, got %s\n",
+    ok(hres == S_OK, "get_responseText failed: %08x\n", hres);
+    ok(text != NULL, "test == NULL\n");
+    ok(!strcmp_wa(text, EXPECT_RESPONSE_TEXT), "expect %s, got %s\n",
         EXPECT_RESPONSE_TEXT, wine_dbgstr_w(text));
     SysFreeString(text);
 
diff --git a/dlls/mshtml/xmlhttprequest.c b/dlls/mshtml/xmlhttprequest.c
index 54f0187..f680b17 100644
--- a/dlls/mshtml/xmlhttprequest.c
+++ b/dlls/mshtml/xmlhttprequest.c
@@ -289,8 +289,17 @@ static HRESULT WINAPI HTMLXMLHttpRequest_get_responseBody(IHTMLXMLHttpRequest *i
 static HRESULT WINAPI HTMLXMLHttpRequest_get_responseText(IHTMLXMLHttpRequest *iface, BSTR *p)
 {
     HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+    nsAString nsstr;
+    nsresult nsres;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    if(!p)
+        return E_POINTER;
+
+    nsAString_Init(&nsstr, NULL);
+    nsres = nsIXMLHttpRequest_GetResponseText(This->nsxhr, &nsstr);
+    return return_nsstr(nsres, &nsstr, p);
 }
 
 static HRESULT WINAPI HTMLXMLHttpRequest_get_responseXML(IHTMLXMLHttpRequest *iface, IDispatch **p)




More information about the wine-cvs mailing list