urlmon: Fixed some occasionally failing tests.

This commit is contained in:
Jacek Caban 2014-05-20 15:11:03 +02:00 committed by Alexandre Julliard
parent a6374aad41
commit 1687c5cd3a
1 changed files with 8 additions and 3 deletions

View File

@ -2810,6 +2810,7 @@ static BOOL test_RegisterBindStatusCallback(void)
#define BINDTEST_ABORT_START 0x0400
#define BINDTEST_ABORT_PROGRESS 0x0800
#define BINDTEST_ASYNC_SWITCH 0x1000
#define BINDTEST_ALLOW_FINDINGRESOURCE 0x2000
static void init_bind_test(int protocol, DWORD flags, DWORD t)
{
@ -2885,9 +2886,11 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
MSG msg;
IBindStatusCallback *previousclb;
IUnknown *unk = (IUnknown*)0x00ff00ff;
BOOL allow_finding_resource;
IBinding *bind;
init_bind_test(protocol, flags, t);
allow_finding_resource = (flags & BINDTEST_ALLOW_FINDINGRESOURCE) != 0;
if(no_callback) {
hres = CreateBindCtx(0, &bctx);
@ -2967,7 +2970,7 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
SET_EXPECT(BeginningTransaction);
SET_EXPECT(QueryInterface_IHttpNegotiate2);
SET_EXPECT(GetRootSecurityId);
if(http_is_first)
if(http_is_first || allow_finding_resource)
SET_EXPECT(OnProgress_FINDINGRESOURCE);
SET_EXPECT(OnProgress_CONNECTING);
}
@ -3125,6 +3128,8 @@ static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
CLEAR_CALLED(OnProgress_CONNECTING);
}
}else if(!abort_start) {
if(allow_finding_resource)
CLEAR_CALLED(OnProgress_FINDINGRESOURCE);
/* IE7 does call this */
CLEAR_CALLED(OnProgress_CONNECTING);
}
@ -3951,7 +3956,7 @@ START_TEST(url)
test_BindToObject(HTTP_TEST, 0, S_OK);
trace("http test (short response)...\n");
test_BindToStorage(HTTP_TEST, BINDTEST_HTTPRESPONSE, TYMED_ISTREAM);
test_BindToStorage(HTTP_TEST, BINDTEST_HTTPRESPONSE|BINDTEST_ALLOW_FINDINGRESOURCE, TYMED_ISTREAM);
trace("http test (short response, to object)...\n");
test_BindToObject(HTTP_TEST, 0, S_OK);
@ -3965,7 +3970,7 @@ START_TEST(url)
test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_START, TYMED_FILE);
trace("http test (abort progress)...\n");
test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_PROGRESS, TYMED_FILE);
test_BindToStorage(HTTP_TEST, BINDTEST_ABORT_PROGRESS|BINDTEST_ALLOW_FINDINGRESOURCE, TYMED_FILE);
trace("emulated http test...\n");
test_BindToStorage(HTTP_TEST, BINDTEST_EMULATE, TYMED_ISTREAM);