Commit e0ef2d17 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed the first ReportData invocation when binding from objects created by BindToObject.

parent 87a138f3
...@@ -1566,7 +1566,8 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, I ...@@ -1566,7 +1566,8 @@ static HRESULT start_binding(IMoniker *mon, Binding *binding_ctx, LPCWSTR url, I
set_binding_sink(binding->protocol, PROTSINK(binding), BINDINF(binding)); set_binding_sink(binding->protocol, PROTSINK(binding), BINDINF(binding));
if(binding_ctx->redirect_url) if(binding_ctx->redirect_url)
IBindStatusCallback_OnProgress(binding->callback, 0, 0, BINDSTATUS_REDIRECTING, binding_ctx->redirect_url); IBindStatusCallback_OnProgress(binding->callback, 0, 0, BINDSTATUS_REDIRECTING, binding_ctx->redirect_url);
report_data(binding, 0, 0, 0); report_data(binding, BSCF_FIRSTDATANOTIFICATION | (binding_ctx->download_state == END_DOWNLOAD ? BSCF_LASTDATANOTIFICATION : 0),
0, 0);
}else { }else {
hres = IInternetProtocol_Start(binding->protocol, url, PROTSINK(binding), hres = IInternetProtocol_Start(binding->protocol, url, PROTSINK(binding),
BINDINF(binding), PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0); BINDINF(binding), PI_APARTMENTTHREADED|PI_MIMEVERIFICATION, 0);
......
...@@ -189,7 +189,7 @@ static IInternetProtocolSink *protocol_sink = NULL; ...@@ -189,7 +189,7 @@ static IInternetProtocolSink *protocol_sink = NULL;
static IBinding *current_binding; static IBinding *current_binding;
static HANDLE complete_event, complete_event2; static HANDLE complete_event, complete_event2;
static HRESULT binding_hres; static HRESULT binding_hres;
static BOOL have_IHttpNegotiate2, use_bscex; static BOOL have_IHttpNegotiate2, use_bscex, is_async_prot;
static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort; static BOOL test_redirect, use_cache_file, callback_read, no_callback, test_abort;
static WCHAR cache_file_name[MAX_PATH]; static WCHAR cache_file_name[MAX_PATH];
...@@ -1601,6 +1601,9 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW ...@@ -1601,6 +1601,9 @@ static HRESULT WINAPI statusclb_OnDataAvailable(IBindStatusCallbackEx *iface, DW
download_state); download_state);
data_available = TRUE; data_available = TRUE;
if(bind_to_object && !is_async_prot)
ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %x\n", grfBSCF);
ok(pformatetc != NULL, "pformatetx == NULL\n"); ok(pformatetc != NULL, "pformatetx == NULL\n");
if(pformatetc) { if(pformatetc) {
if (mime_type[0]) { if (mime_type[0]) {
...@@ -2452,6 +2455,7 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t) ...@@ -2452,6 +2455,7 @@ static void init_bind_test(int protocol, DWORD flags, DWORD t)
callback_read = !(flags & BINDTEST_NO_CALLBACK_READ); callback_read = !(flags & BINDTEST_NO_CALLBACK_READ);
no_callback = (flags & BINDTEST_NO_CALLBACK) != 0; no_callback = (flags & BINDTEST_NO_CALLBACK) != 0;
test_abort = (flags & BINDTEST_ABORT) != 0; test_abort = (flags & BINDTEST_ABORT) != 0;
is_async_prot = protocol == HTTP_TEST || protocol == HTTPS_TEST || protocol == FTP_TEST || protocol == WINETEST_TEST;
} }
static void test_BindToStorage(int protocol, DWORD flags, DWORD t) static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment