ieframe: Added init_test helper.
This commit is contained in:
parent
4bc259951b
commit
c3e4a901c0
|
@ -3304,6 +3304,18 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download)
|
||||||
IOleObject_Release(oo);
|
IOleObject_Release(oo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define TEST_DOWNLOAD 0x0001
|
||||||
|
#define TEST_NOOLECMD 0x0002
|
||||||
|
#define TEST_NODOCHOST 0x0004
|
||||||
|
|
||||||
|
static void init_test(DWORD flags)
|
||||||
|
{
|
||||||
|
is_downloading = (flags & TEST_DOWNLOAD) != 0;
|
||||||
|
is_first_load = TRUE;
|
||||||
|
use_container_olecmd = !(flags & TEST_NOOLECMD);
|
||||||
|
use_container_dochostui = !(flags & TEST_NODOCHOST);
|
||||||
|
}
|
||||||
|
|
||||||
static void test_WebBrowser(BOOL do_download, BOOL do_close)
|
static void test_WebBrowser(BOOL do_download, BOOL do_close)
|
||||||
{
|
{
|
||||||
IUnknown *unk = NULL;
|
IUnknown *unk = NULL;
|
||||||
|
@ -3313,10 +3325,7 @@ static void test_WebBrowser(BOOL do_download, BOOL do_close)
|
||||||
if (FAILED(create_WebBrowser(&unk)))
|
if (FAILED(create_WebBrowser(&unk)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
is_downloading = FALSE;
|
init_test(do_download ? TEST_DOWNLOAD : 0);
|
||||||
is_first_load = TRUE;
|
|
||||||
use_container_olecmd = TRUE;
|
|
||||||
use_container_dochostui = TRUE;
|
|
||||||
|
|
||||||
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
|
hres = IUnknown_QueryInterface(unk, &IID_IWebBrowser2, (void**)&wb);
|
||||||
ok(hres == S_OK, "Could not get IWebBrowser2 iface: %08x\n", hres);
|
ok(hres == S_OK, "Could not get IWebBrowser2 iface: %08x\n", hres);
|
||||||
|
@ -3426,10 +3435,7 @@ static void test_WebBrowser_slim_container(void)
|
||||||
HRESULT hres;
|
HRESULT hres;
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
|
|
||||||
is_downloading = FALSE;
|
init_test(TEST_NOOLECMD|TEST_NODOCHOST);
|
||||||
is_first_load = TRUE;
|
|
||||||
use_container_olecmd = FALSE;
|
|
||||||
use_container_dochostui = FALSE;
|
|
||||||
|
|
||||||
/* Setup stage */
|
/* Setup stage */
|
||||||
if (FAILED(create_WebBrowser(&unk)))
|
if (FAILED(create_WebBrowser(&unk)))
|
||||||
|
@ -3465,9 +3471,7 @@ static void test_WebBrowser_DoVerb(void)
|
||||||
ULONG ref;
|
ULONG ref;
|
||||||
BOOL res;
|
BOOL res;
|
||||||
|
|
||||||
is_downloading = FALSE;
|
init_test(0);
|
||||||
is_first_load = TRUE;
|
|
||||||
use_container_olecmd = FALSE;
|
|
||||||
|
|
||||||
if (FAILED(create_WebBrowser(&unk)))
|
if (FAILED(create_WebBrowser(&unk)))
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue