Piotr Caban : mshtml: Added more IHTMLElement_{put, get}_onclick tests.

Alexandre Julliard julliard at winehq.org
Fri Sep 2 13:13:39 CDT 2011


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Fri Sep  2 14:18:18 2011 +0200

mshtml: Added more IHTMLElement_{put, get}_onclick tests.

---

 dlls/mshtml/tests/events.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c
index 55baaca..1498818 100644
--- a/dlls/mshtml/tests/events.c
+++ b/dlls/mshtml/tests/events.c
@@ -1437,6 +1437,20 @@ static void test_onclick(IHTMLDocument2 *doc)
     hres = IHTMLElement_put_onclick(div, v);
     ok(hres == E_NOTIMPL, "put_onclick failed: %08x\n", hres);
 
+    V_VT(&v) = VT_BSTR;
+    V_BSTR(&v) = a2bstr("function();");
+    hres = IHTMLElement_put_onclick(div, v);
+    todo_wine ok(hres == S_OK, "put_onclick failed: %08x\n", hres);
+
+    if(hres == S_OK) {
+        V_VT(&v) = VT_EMPTY;
+        hres = IHTMLElement_get_onclick(div, &v);
+        ok(hres == S_OK, "get_onclick failed: %08x\n", hres);
+        ok(V_VT(&v) == VT_BSTR, "V_VT(onclick) = %d\n", V_VT(&v));
+        ok(!strcmp_wa(V_BSTR(&v), "function();"), "V_BSTR(onclick) = %s\n", wine_dbgstr_w(V_BSTR(&v)));
+    }
+    VariantClear(&v);
+
     V_VT(&v) = VT_DISPATCH;
     V_DISPATCH(&v) = (IDispatch*)&div_onclick_obj;
     hres = IHTMLElement_put_onclick(div, v);




More information about the wine-cvs mailing list