Jacek Caban : mshtml: Added IHTMLMimeTypesCollection:: get_length implementation.

Alexandre Julliard julliard at winehq.org
Tue May 31 13:08:19 CDT 2011


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue May 31 12:20:24 2011 +0200

mshtml: Added IHTMLMimeTypesCollection::get_length implementation.

---

 dlls/mshtml/omnavigator.c |    8 ++++++--
 dlls/mshtml/tests/dom.c   |    6 ++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/omnavigator.c b/dlls/mshtml/omnavigator.c
index 92afc98..79db598 100644
--- a/dlls/mshtml/omnavigator.c
+++ b/dlls/mshtml/omnavigator.c
@@ -294,8 +294,12 @@ static HRESULT WINAPI HTMLMimeTypesCollection_Invoke(IHTMLMimeTypesCollection *i
 static HRESULT WINAPI HTMLMimeTypesCollection_get_length(IHTMLMimeTypesCollection *iface, LONG *p)
 {
     HTMLMimeTypesCollection *This = impl_from_IHTMLMimeTypesCollection(iface);
-    FIXME("(%p)->(%p)\n", This, p);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, p);
+
+    /* This is just a stub for compatibility with other browser in IE */
+    *p = 0;
+    return S_OK;
 }
 
 static const IHTMLMimeTypesCollectionVtbl HTMLMimeTypesCollectionVtbl = {
diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c
index 9712605..4329be3 100644
--- a/dlls/mshtml/tests/dom.c
+++ b/dlls/mshtml/tests/dom.c
@@ -3830,6 +3830,7 @@ static void test_plugins_col(IOmNavigator *nav)
 static void test_mime_types_col(IOmNavigator *nav)
 {
     IHTMLMimeTypesCollection *col, *col2;
+    LONG length;
     ULONG ref;
     HRESULT hres;
 
@@ -3843,6 +3844,11 @@ static void test_mime_types_col(IOmNavigator *nav)
 
     test_disp((IUnknown*)col, &IID_IHTMLMimeTypesCollection, "[object]");
 
+    length = 0xdeadbeef;
+    hres = IHTMLMimeTypesCollection_get_length(col, &length);
+    ok(hres == S_OK, "get_length failed: %08x\n", hres);
+    ok(!length, "length = %d\n", length);
+
     ref = IHTMLMimeTypesCollection_Release(col);
     ok(!ref, "ref=%d\n", ref);
 }




More information about the wine-cvs mailing list