vbscript/tests: Try calling GetObject again if it fails the first time.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alex Henrie 2017-10-24 15:15:35 +01:00 committed by Alexandre Julliard
parent 6afba6c657
commit 8d8ebc9641
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,8 @@
extern const CLSID CLSID_VBScript;
#define VB_E_ACCESS_DENIED 0x800a0046
#define DEFINE_EXPECT(func) \
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
@ -988,6 +990,8 @@ static void test_GetObject(void)
SET_EXPECT(SetSite);
SET_EXPECT(reportSuccess);
hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
if(broken(hres == VB_E_ACCESS_DENIED)) /* 64-bit win8 fails on the first try */
hres = parse_script_ae(parser, "Call GetObject(\"clsid:" TESTOBJINST_CLSID "\").reportSuccess()");
if(hres == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND)) { /* Workaround for broken win2k */
win_skip("got unexpected error %08x\n", hres);
CLEAR_CALLED(QI_IObjectWithSite);