>From 7e41137bd63075355cd36c321f15ab48bffe52fa Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Sat, 5 Nov 2011 12:27:55 +0300
Subject: [PATCH 4/6] Test that IXMLHTTPRequest doesn't support IDispatchEx

---
 dlls/msxml3/httprequest.c  |    5 +----
 dlls/msxml3/tests/domdoc.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index 0265c1a..32cfc2c 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -607,13 +607,10 @@ static HRESULT WINAPI httprequest_GetTypeInfo(IXMLHTTPRequest *iface, UINT iTInf
         LCID lcid, ITypeInfo **ppTInfo)
 {
     httprequest *This = impl_from_IXMLHTTPRequest( iface );
-    HRESULT hr;
 
     TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
 
-    hr = get_typeinfo(IXMLHTTPRequest_tid, ppTInfo);
-
-    return hr;
+    return get_typeinfo(IXMLHTTPRequest_tid, ppTInfo);
 }
 
 static HRESULT WINAPI httprequest_GetIDsOfNames(IXMLHTTPRequest *iface, REFIID riid,
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index 54ec8fc..b124eaa 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -10671,6 +10671,7 @@ static void test_dispex(void)
     IXMLDOMParseError *error;
     IXMLDOMNamedNodeMap *map;
     IXMLDOMDocument *doc;
+    IXMLHTTPRequest *req;
     IXMLDOMElement *elem;
     IDispatchEx *dispex;
     IXMLDOMNode *node;
@@ -10772,6 +10773,17 @@ static void test_dispex(void)
     IXMLDOMElement_Release(elem);
 
     IXMLDOMDocument_Release(doc);
+
+    /* IXMLHTTPRequest */
+    hr = CoCreateInstance(&CLSID_XMLHTTPRequest, NULL, CLSCTX_INPROC_SERVER,
+        &IID_IXMLHttpRequest, (void**)&req);
+    if (hr == S_OK)
+    {
+        hr = IXMLHTTPRequest_QueryInterface(req, &IID_IDispatchEx, (void**)&dispex);
+        EXPECT_HR(hr, E_NOINTERFACE);
+        IXMLHTTPRequest_Release(req);
+    }
+
     free_bstrs();
 }
 
-- 
1.5.6.5


