mshtml.dll:Add implementation of HTMLDocument_(Get|Set)Title
Ivan Sinitsin
ivan at etersoft.ru
Wed Jul 9 08:23:35 CDT 2008
В сообщении от Friday 04 July 2008 19:23:32 вы написали:
> Ivan Sinitsin wrote:
> > Changelog:
> > mshtml.dll:Add implementation of HTMLDocument_(Get|Set)Title
>
> First of all it would be nice if you could add a test case for these.
>
Hi,
I make test for HTMLDocument_(Get|Set)Title.
What do you think about it? Is it right?
On IE it - ok, but Gecko - failed.
>
> Jacek
--
Sinitsin Ivan
-------------- next part --------------
From 1456122d0ec239b1e34bc409c560f0da4ce39f2a Mon Sep 17 00:00:00 2001
From: Sinitsin Ivan <ivan at etersoft.ru>
Date: Wed, 9 Jul 2008 17:16:38 +0400
Subject: [PATCH] add test for HTMLDocument_(Get|Put)Title
---
dlls/mshtml/tests/htmldoc.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c
index 4de5286..1eecb59 100644
--- a/dlls/mshtml/tests/htmldoc.c
+++ b/dlls/mshtml/tests/htmldoc.c
@@ -3664,6 +3664,32 @@ static void test_external(IUnknown *unk, BOOL initialized)
IHTMLWindow2_Release(htmlwin);
}
+static void test_Title(IUnknown *unk)
+{
+ IHTMLDocument2 *htmldoc;
+ BSTR ptitle, gtitle;
+ const WCHAR title[] = {
+ 'H','T','M','L',' ','T','i','t','l','e',0};
+ HRESULT hres;
+
+ hres = IUnknown_QueryInterface(unk, &IID_IHTMLDocument2, (void**)&htmldoc);
+ ok(hres == S_OK, "QueryInterface(IID_IHTMLWindow2) failed: %08x\n", hres);
+
+ ptitle = SysAllocString(title);
+
+ hres = IHTMLDocument2_put_title(htmldoc, ptitle);
+ ok(hres == S_OK, "put_Title failed: %08x\n", hres);
+
+ hres = IHTMLDocument2_get_title(htmldoc, >itle);
+ ok(hres == S_OK, "get_Title failed: %08x\n", hres);
+
+ ok(!lstrcmpiW(ptitle, gtitle), "title not equal \n");
+
+ SysFreeString(ptitle);
+ SysFreeString(gtitle);
+ IHTMLDocument2_Release(htmldoc);
+}
+
static void test_StreamLoad(IUnknown *unk)
{
IPersistStreamInit *init;
@@ -3785,6 +3811,7 @@ static void test_HTMLDocument(BOOL do_load)
test_OnAmbientPropertyChange(unk);
test_Window(unk, TRUE);
test_external(unk, TRUE);
+ if (do_load) test_Title(unk);
test_UIDeactivate();
test_OleCommandTarget(unk);
--
1.5.4.5.GIT
More information about the wine-devel
mailing list