2 * Copyright 2011 Jacek Caban for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <wine/test.h>
30 static void test_visible(IWebBrowser2
*wb
)
36 hres
= IWebBrowser2_get_Visible(wb
, &b
);
37 ok(hres
== S_OK
, "get_Visible failed: %08x\n", hres
);
38 ok(b
== VARIANT_FALSE
, "Visible = %x\n", hres
);
40 hres
= IWebBrowser2_put_Visible(wb
, VARIANT_TRUE
);
41 ok(hres
== S_OK
, "put_Visible failed: %08x\n", hres
);
44 hres
= IWebBrowser2_get_Visible(wb
, &b
);
45 ok(hres
== S_OK
, "get_Visible failed: %08x\n", hres
);
46 ok(b
== VARIANT_TRUE
, "Visible = %x\n", hres
);
48 hres
= IWebBrowser2_put_Visible(wb
, VARIANT_FALSE
);
49 ok(hres
== S_OK
, "put_Visible failed: %08x\n", hres
);
52 static void test_InternetExplorer(void)
59 hres
= CoCreateInstance(&CLSID_InternetExplorer
, NULL
, CLSCTX_SERVER
,
60 &IID_IUnknown
, (void**)&unk
);
61 ok(hres
== S_OK
, "Could not create InternetExplorer instance: %08x\n", hres
);
63 hres
= IUnknown_QueryInterface(unk
, &IID_IWebBrowser2
, (void**)&wb
);
64 ok(hres
== S_OK
, "Could not get IWebBrowser2 interface: %08x\n", hres
);
68 IWebBrowser2_Release(wb
);
69 ref
= IUnknown_Release(unk
);
70 ok(!ref
, "object not destroyed, ref=%u\n", ref
);
77 test_InternetExplorer();