ReactOS 0.4.15-dev-8131-g4988de4
url.c File Reference
#include <stdarg.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "initguid.h"
#include "urlmon.h"
#include "wininet.h"
#include "mshtml.h"
#include "shlwapi.h"
#include "wine/test.h"
Include dependency graph for url.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define NONAMELESSUNION
 
#define CONST_VTABLE
 
#define DEFINE_EXPECT(func)    static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
#define SET_EXPECT(func)    do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
 
#define CHECK_EXPECT2(func)
 
#define CHECK_EXPECT(func)
 
#define CHECK_CALLED(func)
 
#define CHECK_NOT_CALLED(func)
 
#define CHECK_CALLED_BROKEN(func)
 
#define CLEAR_CALLED(func)    expect_ ## func = called_ ## func = FALSE
 
#define BINDTEST_EMULATE   0x0001
 
#define BINDTEST_TOOBJECT   0x0002
 
#define BINDTEST_FILEDWLAPI   0x0004
 
#define BINDTEST_HTTPRESPONSE   0x0008
 
#define BINDTEST_REDIRECT   0x0010
 
#define BINDTEST_USE_CACHE   0x0020
 
#define BINDTEST_NO_CALLBACK_READ   0x0040
 
#define BINDTEST_NO_CALLBACK   0x0080
 
#define BINDTEST_ABORT   0x0100
 
#define BINDTEST_INVALID_CN   0x0200
 
#define BINDTEST_ABORT_START   0x0400
 
#define BINDTEST_ABORT_PROGRESS   0x0800
 
#define BINDTEST_ASYNC_SWITCH   0x1000
 
#define BINDTEST_ALLOW_FINDINGRESOURCE   0x2000
 

Enumerations

enum  {
  HTTP_TEST , ABOUT_TEST , FILE_TEST , ITS_TEST ,
  MK_TEST , HTTPS_TEST , FTP_TEST , WINETEST_TEST ,
  WINETEST_SYNC_TEST
}
 
enum  { BEFORE_DOWNLOAD , DOWNLOADING , END_DOWNLOAD }
 

Functions

static HRESULT (WINAPI *pCreateAsyncBindCtxEx)(IBindCtx *
 
static IUri ** DEFINE_GUID (GUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
 
 DEFINE_GUID (CLSID_IdentityUnmarshal, 0x0000001b, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46)
 
 DEFINE_GUID (IID_IBindStatusCallbackHolder, 0x79eac9cc, 0xbaf9, 0x11ce, 0x8c, 0x82, 0x00, 0xaa, 0x00, 0x4b, 0xa9, 0x0b)
 
 DEFINE_EXPECT (QueryInterface_IServiceProvider)
 
 DEFINE_EXPECT (QueryInterface_IHttpNegotiate)
 
 DEFINE_EXPECT (QueryInterface_IBindStatusCallback)
 
 DEFINE_EXPECT (QueryInterface_IBindStatusCallbackEx)
 
 DEFINE_EXPECT (QueryInterface_IBindStatusCallbackHolder)
 
 DEFINE_EXPECT (QueryInterface_IAuthenticate)
 
 DEFINE_EXPECT (QueryInterface_IInternetProtocol)
 
 DEFINE_EXPECT (QueryInterface_IWindowForBindingUI)
 
 DEFINE_EXPECT (QueryInterface_IHttpSecurity)
 
 DEFINE_EXPECT (QueryService_IAuthenticate)
 
 DEFINE_EXPECT (QueryService_IInternetProtocol)
 
 DEFINE_EXPECT (QueryService_IInternetBindInfo)
 
 DEFINE_EXPECT (QueryService_IWindowForBindingUI)
 
 DEFINE_EXPECT (QueryService_IHttpSecurity)
 
 DEFINE_EXPECT (BeginningTransaction)
 
 DEFINE_EXPECT (OnResponse)
 
 DEFINE_EXPECT (QueryInterface_IHttpNegotiate2)
 
 DEFINE_EXPECT (GetRootSecurityId)
 
 DEFINE_EXPECT (GetBindInfo)
 
 DEFINE_EXPECT (GetBindInfoEx)
 
 DEFINE_EXPECT (OnStartBinding)
 
 DEFINE_EXPECT (OnProgress_FINDINGRESOURCE)
 
 DEFINE_EXPECT (OnProgress_CONNECTING)
 
 DEFINE_EXPECT (OnProgress_REDIRECTING)
 
 DEFINE_EXPECT (OnProgress_SENDINGREQUEST)
 
 DEFINE_EXPECT (OnProgress_MIMETYPEAVAILABLE)
 
 DEFINE_EXPECT (OnProgress_BEGINDOWNLOADDATA)
 
 DEFINE_EXPECT (OnProgress_DOWNLOADINGDATA)
 
 DEFINE_EXPECT (OnProgress_ENDDOWNLOADDATA)
 
 DEFINE_EXPECT (OnProgress_CACHEFILENAMEAVAILABLE)
 
 DEFINE_EXPECT (OnStopBinding)
 
 DEFINE_EXPECT (OnDataAvailable)
 
 DEFINE_EXPECT (OnObjectAvailable)
 
 DEFINE_EXPECT (Obj_OnStartBinding)
 
 DEFINE_EXPECT (Obj_OnStopBinding)
 
 DEFINE_EXPECT (Obj_GetBindInfo)
 
 DEFINE_EXPECT (Obj_OnProgress_BEGINDOWNLOADDATA)
 
 DEFINE_EXPECT (Obj_OnProgress_ENDDOWNLOADDATA)
 
 DEFINE_EXPECT (Obj_OnProgress_SENDINGREQUEST)
 
 DEFINE_EXPECT (Obj_OnProgress_MIMETYPEAVAILABLE)
 
 DEFINE_EXPECT (Obj_OnProgress_CLASSIDAVAILABLE)
 
 DEFINE_EXPECT (Obj_OnProgress_BEGINSYNCOPERATION)
 
 DEFINE_EXPECT (Obj_OnProgress_ENDSYNCOPERATION)
 
 DEFINE_EXPECT (Obj_OnProgress_FINDINGRESOURCE)
 
 DEFINE_EXPECT (Obj_OnProgress_CONNECTING)
 
 DEFINE_EXPECT (Obj_OnProgress_REDIRECTING)
 
 DEFINE_EXPECT (Obj_OnProgress_CACHEFILENAMEAVAILABLE)
 
 DEFINE_EXPECT (Start)
 
 DEFINE_EXPECT (Read)
 
 DEFINE_EXPECT (LockRequest)
 
 DEFINE_EXPECT (Terminate)
 
 DEFINE_EXPECT (UnlockRequest)
 
 DEFINE_EXPECT (Continue)
 
 DEFINE_EXPECT (Abort)
 
 DEFINE_EXPECT (CreateInstance)
 
 DEFINE_EXPECT (Load)
 
 DEFINE_EXPECT (PutProperty_MIMETYPEPROP)
 
 DEFINE_EXPECT (PutProperty_CLASSIDPROP)
 
 DEFINE_EXPECT (SetPriority)
 
 DEFINE_EXPECT (GetWindow_IHttpSecurity)
 
 DEFINE_EXPECT (GetWindow_IWindowForBindingUI)
 
 DEFINE_EXPECT (GetWindow_ICodeInstall)
 
 DEFINE_EXPECT (OnSecurityProblem)
 
static BOOL proxy_active (void)
 
static BOOL is_urlmon_protocol (int prot)
 
static void test_CreateURLMoniker (LPCWSTR url1, LPCWSTR url2)
 
static void test_create (void)
 
static HRESULT WINAPI Priority_QueryInterface (IInternetPriority *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Priority_AddRef (IInternetPriority *iface)
 
static ULONG WINAPI Priority_Release (IInternetPriority *iface)
 
static HRESULT WINAPI Priority_SetPriority (IInternetPriority *iface, LONG nPriority)
 
static HRESULT WINAPI Priority_GetPriority (IInternetPriority *iface, LONG *pnPriority)
 
static HRESULT WINAPI Protocol_QueryInterface (IInternetProtocol *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Protocol_AddRef (IInternetProtocol *iface)
 
static ULONG WINAPI Protocol_Release (IInternetProtocol *iface)
 
static void test_switch_fail (void)
 
static DWORD WINAPI thread_proc (PVOID arg)
 
static HRESULT WINAPI Protocol_Start (IInternetProtocol *iface, LPCWSTR szUrl, IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved)
 
static HRESULT WINAPI Protocol_Continue (IInternetProtocol *iface, PROTOCOLDATA *pProtocolData)
 
static HRESULT WINAPI Protocol_Abort (IInternetProtocol *iface, HRESULT hrReason, DWORD dwOptions)
 
static HRESULT WINAPI Protocol_Terminate (IInternetProtocol *iface, DWORD dwOptions)
 
static HRESULT WINAPI Protocol_Suspend (IInternetProtocol *iface)
 
static HRESULT WINAPI Protocol_Resume (IInternetProtocol *iface)
 
static HRESULT WINAPI Protocol_Read (IInternetProtocol *iface, void *pv, ULONG cb, ULONG *pcbRead)
 
static HRESULT WINAPI Protocol_Seek (IInternetProtocol *iface, LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
 
static HRESULT WINAPI Protocol_LockRequest (IInternetProtocol *iface, DWORD dwOptions)
 
static HRESULT WINAPI Protocol_UnlockRequest (IInternetProtocol *iface)
 
static HRESULT WINAPI HttpNegotiate_QueryInterface (IHttpNegotiate2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HttpNegotiate_AddRef (IHttpNegotiate2 *iface)
 
static ULONG WINAPI HttpNegotiate_Release (IHttpNegotiate2 *iface)
 
static HRESULT WINAPI HttpNegotiate_BeginningTransaction (IHttpNegotiate2 *iface, LPCWSTR szURL, LPCWSTR szHeaders, DWORD dwReserved, LPWSTR *pszAdditionalHeaders)
 
static HRESULT WINAPI HttpNegotiate_OnResponse (IHttpNegotiate2 *iface, DWORD dwResponseCode, LPCWSTR szResponseHeaders, LPCWSTR szRequestHeaders, LPWSTR *pszAdditionalRequestHeaders)
 
static HRESULT WINAPI HttpNegotiate_GetRootSecurityId (IHttpNegotiate2 *iface, BYTE *pbSecurityId, DWORD *pcbSecurityId, DWORD_PTR dwReserved)
 
static HRESULT WINAPI HttpSecurity_QueryInterface (IHttpSecurity *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI HttpSecurity_AddRef (IHttpSecurity *iface)
 
static ULONG WINAPI HttpSecurity_Release (IHttpSecurity *iface)
 
static HRESULT WINAPI HttpSecurity_GetWindow (IHttpSecurity *iface, REFGUID rguidReason, HWND *phwnd)
 
static HRESULT WINAPI HttpSecurity_OnSecurityProblem (IHttpSecurity *iface, DWORD dwProblem)
 
static HRESULT WINAPI ServiceProvider_QueryInterface (IServiceProvider *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ServiceProvider_AddRef (IServiceProvider *iface)
 
static ULONG WINAPI ServiceProvider_Release (IServiceProvider *iface)
 
static HRESULT WINAPI ServiceProvider_QueryService (IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
 
static void test_WinInetHttpInfo (IWinInetHttpInfo *http_info, DWORD progress)
 
static HRESULT WINAPI statusclb_QueryInterface (IBindStatusCallbackEx *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI statusclb_AddRef (IBindStatusCallbackEx *iface)
 
static ULONG WINAPI statusclb_Release (IBindStatusCallbackEx *iface)
 
static HRESULT WINAPI statusclb_OnStartBinding (IBindStatusCallbackEx *iface, DWORD dwReserved, IBinding *pib)
 
static HRESULT WINAPI statusclb_GetPriority (IBindStatusCallbackEx *iface, LONG *pnPriority)
 
static HRESULT WINAPI statusclb_OnLowResource (IBindStatusCallbackEx *iface, DWORD reserved)
 
static HRESULT WINAPI statusclb_OnProgress (IBindStatusCallbackEx *iface, ULONG ulProgress, ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
 
static HRESULT WINAPI statusclb_OnStopBinding (IBindStatusCallbackEx *iface, HRESULT hresult, LPCWSTR szError)
 
static HRESULT WINAPI statusclb_GetBindInfo (IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo)
 
static void test_stream_seek (IStream *stream)
 
static HRESULT WINAPI statusclb_OnDataAvailable (IBindStatusCallbackEx *iface, DWORD grfBSCF, DWORD dwSize, FORMATETC *pformatetc, STGMEDIUM *pstgmed)
 
static HRESULT WINAPI statusclb_OnObjectAvailable (IBindStatusCallbackEx *iface, REFIID riid, IUnknown *punk)
 
static HRESULT WINAPI statusclb_GetBindInfoEx (IBindStatusCallbackEx *iface, DWORD *grfBINDF, BINDINFO *pbindinfo, DWORD *grfBINDF2, DWORD *pdwReserved)
 
static HRESULT WINAPI MonikerProp_QueryInterface (IMonikerProp *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MonikerProp_AddRef (IMonikerProp *iface)
 
static ULONG WINAPI MonikerProp_Release (IMonikerProp *iface)
 
static HRESULT WINAPI MonikerProp_PutProperty (IMonikerProp *iface, MONIKERPROPERTY mkp, LPCWSTR val)
 
static HRESULT WINAPI PersistMoniker_QueryInterface (IPersistMoniker *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI PersistMoniker_AddRef (IPersistMoniker *iface)
 
static ULONG WINAPI PersistMoniker_Release (IPersistMoniker *iface)
 
static HRESULT WINAPI PersistMoniker_GetClassID (IPersistMoniker *iface, CLSID *pClassID)
 
static HRESULT WINAPI PersistMoniker_IsDirty (IPersistMoniker *iface)
 
static HRESULT WINAPI PersistMoniker_Load (IPersistMoniker *iface, BOOL fFullyAvailable, IMoniker *pimkName, LPBC pibc, DWORD grfMode)
 
static HRESULT WINAPI PersistMoniker_Save (IPersistMoniker *iface, IMoniker *pimkName, LPBC pbc, BOOL fRemember)
 
static HRESULT WINAPI PersistMoniker_SaveCompleted (IPersistMoniker *iface, IMoniker *pimkName, LPBC pibc)
 
static HRESULT WINAPI PersistMoniker_GetCurMoniker (IPersistMoniker *iface, IMoniker **pimkName)
 
static HRESULT WINAPI ClassFactory_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI ClassFactory_AddRef (IClassFactory *iface)
 
static ULONG WINAPI ClassFactory_Release (IClassFactory *iface)
 
static HRESULT WINAPI ClassFactory_CreateInstance (IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
static HRESULT WINAPI ProtocolCF_QueryInterface (IClassFactory *iface, REFIID riid, void **ppv)
 
static HRESULT WINAPI ProtocolCF_CreateInstance (IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
 
static void test_CreateAsyncBindCtx (void)
 
static void test_CreateAsyncBindCtxEx (void)
 
static void test_GetBindInfoEx (IBindStatusCallback *holder)
 
static BOOL test_bscholder (IBindStatusCallback *holder)
 
static BOOL test_RegisterBindStatusCallback (void)
 
static void init_bind_test (int protocol, DWORD flags, DWORD t)
 
static void test_BindToStorage (int protocol, DWORD flags, DWORD t)
 
static void test_BindToObject (int protocol, DWORD flags, HRESULT exhres)
 
static void test_URLDownloadToFile (DWORD prot, BOOL emul)
 
static void test_URLDownloadToFile_abort (void)
 
static void set_file_url (char *path)
 
static void create_file (const char *file_name, const char *content)
 
static void create_html_file (void)
 
static void create_cache_file (void)
 
static void test_ReportResult (HRESULT exhres)
 
static void test_BindToStorage_fail (void)
 
static void test_StdURLMoniker (void)
 
static void register_protocols (void)
 
static BOOL can_do_https (void)
 
 START_TEST (url)
 

Variables

static DWORD
 
static DWORD_PTR
 
static const IID IID_undocumentedIE11 = {0xd5ae15f6,0x2032,0x488e,{0x8f,0x96,0xf9,0x24,0x06,0xd8,0xd8,0xb4}}
 
CLSID CLSID_AboutProtocol
 
static const WCHAR winetest_data_urlW []
 
static const WCHAR about_blankW [] = {'a','b','o','u','t',':','b','l','a','n','k',0}
 
static const WCHAR wszTextHtml [] = {'t','e','x','t','/','h','t','m','l',0}
 
static WCHAR BSCBHolder [] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 }
 
static const WCHAR wszWineHQSite []
 
static const WCHAR wszWineHQIP []
 
static const CHAR wszIndexHtmlA [] = "index.html"
 
static const WCHAR cache_fileW [] = {'c',':','\\','c','a','c','h','e','.','h','t','m',0}
 
static const CHAR dwl_htmlA [] = "dwl.html"
 
static const WCHAR dwl_htmlW [] = {'d','w','l','.','h','t','m','l',0}
 
static const CHAR test_txtA [] = "test.txt"
 
static const WCHAR emptyW [] = {0}
 
static BOOL stopped_binding = FALSE
 
static BOOL stopped_obj_binding = FALSE
 
static BOOL emulate_protocol = FALSE
 
static BOOL data_available = FALSE
 
static BOOL http_is_first = TRUE
 
static BOOL bind_to_object = FALSE
 
static BOOL filedwl_api
 
static BOOL post_test
 
static DWORD read = 0
 
static DWORD bindf = 0
 
static DWORD prot_state = 0
 
static DWORD thread_id
 
static DWORD tymed
 
static DWORD security_problem
 
static const WCHARreported_url
 
static CHAR mime_type [512]
 
static IInternetProtocolSinkprotocol_sink = NULL
 
static IBindingcurrent_binding
 
static HANDLE complete_event
 
static HANDLE complete_event2
 
static HRESULT binding_hres
 
static HRESULT onsecurityproblem_hres
 
static HRESULT abort_hres
 
static BOOL have_IHttpNegotiate2
 
static BOOL use_bscex
 
static BOOL is_async_prot
 
static BOOL test_redirect
 
static BOOL use_cache_file
 
static BOOL callback_read
 
static BOOL no_callback
 
static BOOL test_abort
 
static WCHAR cache_file_name [MAX_PATH]
 
static WCHAR http_cache_file [MAX_PATH]
 
static BOOL only_check_prot_args = FALSE
 
static BOOL invalid_cn_accepted = FALSE
 
static BOOL abort_start = FALSE
 
static BOOL abort_progress = FALSE
 
static BOOL async_switch = FALSE
 
static BOOL strict_bsc_qi
 
static DWORD bindtest_flags
 
static const chartest_file
 
static WCHAR file_url [INTERNET_MAX_URL_LENGTH]
 
static WCHAR current_url [INTERNET_MAX_URL_LENGTH]
 
static enum { ... }  test_protocol
 
static enum { ... }  download_state
 
static const IInternetPriorityVtbl InternetPriorityVtbl
 
static IInternetPriority InternetPriority = { &InternetPriorityVtbl }
 
static const IInternetProtocolVtbl ProtocolVtbl
 
static IInternetProtocol Protocol = { &ProtocolVtbl }
 
static IHttpNegotiate2Vtbl HttpNegotiateVtbl
 
static IHttpNegotiate2 HttpNegotiate = { &HttpNegotiateVtbl }
 
static const IHttpSecurityVtbl HttpSecurityVtbl
 
static IHttpSecurity HttpSecurity = { &HttpSecurityVtbl }
 
static IServiceProviderVtbl ServiceProviderVtbl
 
static IServiceProvider ServiceProvider = { &ServiceProviderVtbl }
 
static IBindStatusCallbackEx objbsc = { &BindStatusCallbackVtbl }
 
static const IBindStatusCallbackExVtbl BindStatusCallbackVtbl
 
static IBindStatusCallbackEx bsc = { &BindStatusCallbackVtbl }
 
static IBindStatusCallbackEx bsc2 = { &BindStatusCallbackVtbl }
 
static const IMonikerPropVtbl MonikerPropVtbl
 
static IMonikerProp MonikerProp = { &MonikerPropVtbl }
 
static const IPersistMonikerVtbl PersistMonikerVtbl
 
static IPersistMoniker PersistMoniker = { &PersistMonikerVtbl }
 
static const IClassFactoryVtbl ClassFactoryVtbl
 
static IClassFactory mime_cf = { &ClassFactoryVtbl }
 
static const IClassFactoryVtbl ProtocolCFVtbl
 
static IClassFactory protocol_cf = { &ProtocolCFVtbl }
 

Macro Definition Documentation

◆ BINDTEST_ABORT

#define BINDTEST_ABORT   0x0100

Definition at line 2861 of file url.c.

◆ BINDTEST_ABORT_PROGRESS

#define BINDTEST_ABORT_PROGRESS   0x0800

Definition at line 2864 of file url.c.

◆ BINDTEST_ABORT_START

#define BINDTEST_ABORT_START   0x0400

Definition at line 2863 of file url.c.

◆ BINDTEST_ALLOW_FINDINGRESOURCE

#define BINDTEST_ALLOW_FINDINGRESOURCE   0x2000

Definition at line 2866 of file url.c.

◆ BINDTEST_ASYNC_SWITCH

#define BINDTEST_ASYNC_SWITCH   0x1000

Definition at line 2865 of file url.c.

◆ BINDTEST_EMULATE

#define BINDTEST_EMULATE   0x0001

Definition at line 2853 of file url.c.

◆ BINDTEST_FILEDWLAPI

#define BINDTEST_FILEDWLAPI   0x0004

Definition at line 2855 of file url.c.

◆ BINDTEST_HTTPRESPONSE

#define BINDTEST_HTTPRESPONSE   0x0008

Definition at line 2856 of file url.c.

◆ BINDTEST_INVALID_CN

#define BINDTEST_INVALID_CN   0x0200

Definition at line 2862 of file url.c.

◆ BINDTEST_NO_CALLBACK

#define BINDTEST_NO_CALLBACK   0x0080

Definition at line 2860 of file url.c.

◆ BINDTEST_NO_CALLBACK_READ

#define BINDTEST_NO_CALLBACK_READ   0x0040

Definition at line 2859 of file url.c.

◆ BINDTEST_REDIRECT

#define BINDTEST_REDIRECT   0x0010

Definition at line 2857 of file url.c.

◆ BINDTEST_TOOBJECT

#define BINDTEST_TOOBJECT   0x0002

Definition at line 2854 of file url.c.

◆ BINDTEST_USE_CACHE

#define BINDTEST_USE_CACHE   0x0020

Definition at line 2858 of file url.c.

◆ CHECK_CALLED

#define CHECK_CALLED (   func)
Value:
do { \
ok(called_ ## func, "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define FALSE
Definition: types.h:117
GLenum func
Definition: glext.h:6028
#define expect_(expected, got, precision)
Definition: font.c:29

Definition at line 67 of file url.c.

◆ CHECK_CALLED_BROKEN

#define CHECK_CALLED_BROKEN (   func)
Value:
do { \
ok(called_ ## func || broken(!called_ ## func), "expected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)
#define broken(x)
Definition: _sntprintf.h:21

Definition at line 79 of file url.c.

◆ CHECK_EXPECT

#define CHECK_EXPECT (   func)
Value:
do { \
CHECK_EXPECT2(func); \
expect_ ## func = FALSE; \
}while(0)

Definition at line 61 of file url.c.

◆ CHECK_EXPECT2

#define CHECK_EXPECT2 (   func)
Value:
do { \
ok(expect_ ##func, "unexpected call " #func "\n"); \
called_ ## func = TRUE; \
}while(0)
#define TRUE
Definition: types.h:120

Definition at line 55 of file url.c.

◆ CHECK_NOT_CALLED

#define CHECK_NOT_CALLED (   func)
Value:
do { \
ok(!called_ ## func, "unexpected " #func "\n"); \
expect_ ## func = called_ ## func = FALSE; \
}while(0)

Definition at line 73 of file url.c.

◆ CLEAR_CALLED

#define CLEAR_CALLED (   func)     expect_ ## func = called_ ## func = FALSE

Definition at line 85 of file url.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file url.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 27 of file url.c.

◆ DEFINE_EXPECT

#define DEFINE_EXPECT (   func)     static BOOL expect_ ## func = FALSE, called_ ## func = FALSE

Definition at line 49 of file url.c.

◆ NONAMELESSUNION

#define NONAMELESSUNION

Definition at line 26 of file url.c.

◆ SET_EXPECT

#define SET_EXPECT (   func)     do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)

Definition at line 52 of file url.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HTTP_TEST 
ABOUT_TEST 
FILE_TEST 
ITS_TEST 
MK_TEST 
HTTPS_TEST 
FTP_TEST 
WINETEST_TEST 
WINETEST_SYNC_TEST 

Definition at line 198 of file url.c.

198 {
199 HTTP_TEST,
201 FILE_TEST,
202 ITS_TEST,
203 MK_TEST,
205 FTP_TEST,
static enum @1723 test_protocol
@ FTP_TEST
Definition: url.c:205
@ WINETEST_SYNC_TEST
Definition: url.c:207
@ FILE_TEST
Definition: url.c:201
@ HTTPS_TEST
Definition: url.c:204
@ HTTP_TEST
Definition: url.c:199
@ WINETEST_TEST
Definition: url.c:206
@ MK_TEST
Definition: url.c:203
@ ABOUT_TEST
Definition: url.c:200
@ ITS_TEST
Definition: url.c:202

◆ anonymous enum

anonymous enum
Enumerator
BEFORE_DOWNLOAD 
DOWNLOADING 
END_DOWNLOAD 

Definition at line 210 of file url.c.

210 {
static enum @1724 download_state
@ END_DOWNLOAD
Definition: url.c:213
@ BEFORE_DOWNLOAD
Definition: url.c:211
@ DOWNLOADING
Definition: url.c:212

Function Documentation

◆ can_do_https()

static BOOL can_do_https ( void  )
static

Definition at line 3897 of file url.c.

3898{
3899 HINTERNET ses, con, req;
3900 BOOL ret;
3901
3902 ses = InternetOpenA("winetest", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
3903 ok(ses != NULL, "InternetOpen failed\n");
3904
3905 con = InternetConnectA(ses, "test.winehq.org", INTERNET_DEFAULT_HTTPS_PORT,
3907 ok(con != NULL, "InternetConnect failed\n");
3908
3909 req = HttpOpenRequestA(con, "GET", "/tests/hello.html", NULL, NULL, NULL,
3911 ok(req != NULL, "HttpOpenRequest failed\n");
3912
3913 ret = HttpSendRequestA(req, NULL, 0, NULL, 0);
3915 "request failed: %u\n", GetLastError());
3916
3920 return ret;
3921}
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
HINTERNET WINAPI HttpOpenRequestA(HINTERNET hHttpSession, LPCSTR lpszVerb, LPCSTR lpszObjectName, LPCSTR lpszVersion, LPCSTR lpszReferrer, LPCSTR *lpszAcceptTypes, DWORD dwFlags, DWORD_PTR dwContext)
Definition: http.c:1410
BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders, DWORD dwHeaderLength, LPVOID lpOptional, DWORD dwOptionalLength)
Definition: http.c:5677
HINTERNET WINAPI InternetOpenA(LPCSTR lpszAgent, DWORD dwAccessType, LPCSTR lpszProxy, LPCSTR lpszProxyBypass, DWORD dwFlags)
Definition: internet.c:1057
BOOL WINAPI InternetCloseHandle(HINTERNET hInternet)
Definition: internet.c:1414
HINTERNET WINAPI InternetConnectA(HINTERNET hInternet, LPCSTR lpszServerName, INTERNET_PORT nServerPort, LPCSTR lpszUserName, LPCSTR lpszPassword, DWORD dwService, DWORD dwFlags, DWORD_PTR dwContext)
Definition: internet.c:1321
unsigned int BOOL
Definition: ntddk_ex.h:94
int ret
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define INTERNET_DEFAULT_HTTPS_PORT
Definition: winhttp.h:37
#define INTERNET_FLAG_SECURE
Definition: wininet.h:71
#define INTERNET_OPEN_TYPE_PRECONFIG
Definition: wininet.h:521
#define ERROR_INTERNET_CANNOT_CONNECT
Definition: wininet.h:2018
#define INTERNET_SERVICE_HTTP
Definition: wininet.h:562

Referenced by START_TEST().

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 2361 of file url.c.

2362{
2363 return 2;
2364}

◆ ClassFactory_CreateInstance()

static HRESULT WINAPI ClassFactory_CreateInstance ( IClassFactory iface,
IUnknown outer,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2371 of file url.c.

2372{
2373 CHECK_EXPECT(CreateInstance);
2374 ok(!outer, "outer = %p\n", outer);
2375 ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
2376 *ppv = &PersistMoniker;
2377 return S_OK;
2378}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define CHECK_EXPECT(func)
Definition: url.c:61
static IPersistMoniker PersistMoniker
Definition: url.c:2341
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197

◆ ClassFactory_LockServer()

static HRESULT WINAPI ClassFactory_LockServer ( IClassFactory iface,
BOOL  dolock 
)
static

Definition at line 2380 of file url.c.

2381{
2382 ok(0, "unexpected call\n");
2383 return S_OK;
2384}

◆ ClassFactory_QueryInterface()

static HRESULT WINAPI ClassFactory_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2343 of file url.c.

2344{
2345 *ppv = NULL;
2346
2348 *ppv = iface;
2349 return S_OK;
2350 }
2351
2352 if(IsEqualGUID(&IID_IMarshal, riid))
2353 return E_NOINTERFACE;
2355 return E_NOINTERFACE;
2356
2357 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
2358 return E_NOTIMPL;
2359}
const GUID IID_IClassFactory
const CLSID CLSID_IdentityUnmarshal
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 2366 of file url.c.

2367{
2368 return 1;
2369}

◆ create_cache_file()

static void create_cache_file ( void  )
static

Definition at line 3720 of file url.c.

3721{
3722 char buf[6500], curdir[MAX_PATH];
3723 HANDLE file;
3724 DWORD size;
3725
3728 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
3730 return;
3731
3732 memset(buf, 'X', sizeof(buf));
3733 WriteFile(file, buf, sizeof(buf), &size, NULL);
3735
3736 memset(curdir, 0, sizeof(curdir));
3738 lstrcatA(curdir, "\\");
3739 lstrcatA(curdir, test_txtA);
3740
3742}
#define CloseHandle
Definition: compat.h:739
#define CP_ACP
Definition: compat.h:109
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileA(a, b, c, d, e, f, g)
Definition: compat.h:740
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define MultiByteToWideChar
Definition: compat.h:110
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
Definition: path.c:2146
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:123
#define CREATE_ALWAYS
Definition: disk.h:72
static const CHAR test_txtA[]
Definition: url.c:169
static WCHAR cache_file_name[MAX_PATH]
Definition: url.c:185
#define GENERIC_WRITE
Definition: nt_native.h:90
#define memset(x, y, z)
Definition: compat.h:39
Definition: fci.c:127

Referenced by START_TEST().

◆ create_file()

static void create_file ( const char file_name,
const char content 
)
static

Definition at line 3691 of file url.c.

3692{
3693 HANDLE file;
3694 DWORD size;
3696
3699 ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
3701 return;
3702
3703 if(test_file)
3708
3710 lstrcatA(path, "\\");
3713}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
content
Definition: atl_ax.c:994
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
Definition: delete.c:24
static LPCWSTR file_name
Definition: protocol.c:147
static void set_file_url(char *path)
Definition: url.c:3682
static const char * test_file
Definition: url.c:194
char CHAR
Definition: xmlstorage.h:175

◆ create_html_file()

static void create_html_file ( void  )
static

Definition at line 3715 of file url.c.

3716{
3717 create_file(wszIndexHtmlA, "<HTML></HTML>");
3718}
#define create_file(name, size)
Definition: asmcache.c:813
static const CHAR wszIndexHtmlA[]
Definition: url.c:165

Referenced by START_TEST().

◆ DEFINE_EXPECT() [1/63]

DEFINE_EXPECT ( Abort  )

◆ DEFINE_EXPECT() [2/63]

DEFINE_EXPECT ( BeginningTransaction  )

◆ DEFINE_EXPECT() [3/63]

DEFINE_EXPECT ( Continue  )

◆ DEFINE_EXPECT() [4/63]

DEFINE_EXPECT ( CreateInstance  )

◆ DEFINE_EXPECT() [5/63]

DEFINE_EXPECT ( GetBindInfo  )

◆ DEFINE_EXPECT() [6/63]

DEFINE_EXPECT ( GetBindInfoEx  )

◆ DEFINE_EXPECT() [7/63]

DEFINE_EXPECT ( GetRootSecurityId  )

◆ DEFINE_EXPECT() [8/63]

DEFINE_EXPECT ( GetWindow_ICodeInstall  )

◆ DEFINE_EXPECT() [9/63]

DEFINE_EXPECT ( GetWindow_IHttpSecurity  )

◆ DEFINE_EXPECT() [10/63]

DEFINE_EXPECT ( GetWindow_IWindowForBindingUI  )

◆ DEFINE_EXPECT() [11/63]

DEFINE_EXPECT ( Load  )

◆ DEFINE_EXPECT() [12/63]

DEFINE_EXPECT ( LockRequest  )

◆ DEFINE_EXPECT() [13/63]

DEFINE_EXPECT ( Obj_GetBindInfo  )

◆ DEFINE_EXPECT() [14/63]

DEFINE_EXPECT ( Obj_OnProgress_BEGINDOWNLOADDATA  )

◆ DEFINE_EXPECT() [15/63]

DEFINE_EXPECT ( Obj_OnProgress_BEGINSYNCOPERATION  )

◆ DEFINE_EXPECT() [16/63]

DEFINE_EXPECT ( Obj_OnProgress_CACHEFILENAMEAVAILABLE  )

◆ DEFINE_EXPECT() [17/63]

DEFINE_EXPECT ( Obj_OnProgress_CLASSIDAVAILABLE  )

◆ DEFINE_EXPECT() [18/63]

DEFINE_EXPECT ( Obj_OnProgress_CONNECTING  )

◆ DEFINE_EXPECT() [19/63]

DEFINE_EXPECT ( Obj_OnProgress_ENDDOWNLOADDATA  )

◆ DEFINE_EXPECT() [20/63]

DEFINE_EXPECT ( Obj_OnProgress_ENDSYNCOPERATION  )

◆ DEFINE_EXPECT() [21/63]

DEFINE_EXPECT ( Obj_OnProgress_FINDINGRESOURCE  )

◆ DEFINE_EXPECT() [22/63]

DEFINE_EXPECT ( Obj_OnProgress_MIMETYPEAVAILABLE  )

◆ DEFINE_EXPECT() [23/63]

DEFINE_EXPECT ( Obj_OnProgress_REDIRECTING  )

◆ DEFINE_EXPECT() [24/63]

DEFINE_EXPECT ( Obj_OnProgress_SENDINGREQUEST  )

◆ DEFINE_EXPECT() [25/63]

DEFINE_EXPECT ( Obj_OnStartBinding  )

◆ DEFINE_EXPECT() [26/63]

DEFINE_EXPECT ( Obj_OnStopBinding  )

◆ DEFINE_EXPECT() [27/63]

DEFINE_EXPECT ( OnDataAvailable  )

◆ DEFINE_EXPECT() [28/63]

DEFINE_EXPECT ( OnObjectAvailable  )

◆ DEFINE_EXPECT() [29/63]

DEFINE_EXPECT ( OnProgress_BEGINDOWNLOADDATA  )

◆ DEFINE_EXPECT() [30/63]

DEFINE_EXPECT ( OnProgress_CACHEFILENAMEAVAILABLE  )

◆ DEFINE_EXPECT() [31/63]

DEFINE_EXPECT ( OnProgress_CONNECTING  )

◆ DEFINE_EXPECT() [32/63]

DEFINE_EXPECT ( OnProgress_DOWNLOADINGDATA  )

◆ DEFINE_EXPECT() [33/63]

DEFINE_EXPECT ( OnProgress_ENDDOWNLOADDATA  )

◆ DEFINE_EXPECT() [34/63]

DEFINE_EXPECT ( OnProgress_FINDINGRESOURCE  )

◆ DEFINE_EXPECT() [35/63]

DEFINE_EXPECT ( OnProgress_MIMETYPEAVAILABLE  )

◆ DEFINE_EXPECT() [36/63]

DEFINE_EXPECT ( OnProgress_REDIRECTING  )

◆ DEFINE_EXPECT() [37/63]

DEFINE_EXPECT ( OnProgress_SENDINGREQUEST  )

◆ DEFINE_EXPECT() [38/63]

DEFINE_EXPECT ( OnResponse  )

◆ DEFINE_EXPECT() [39/63]

DEFINE_EXPECT ( OnSecurityProblem  )

◆ DEFINE_EXPECT() [40/63]

DEFINE_EXPECT ( OnStartBinding  )

◆ DEFINE_EXPECT() [41/63]

DEFINE_EXPECT ( OnStopBinding  )

◆ DEFINE_EXPECT() [42/63]

DEFINE_EXPECT ( PutProperty_CLASSIDPROP  )

◆ DEFINE_EXPECT() [43/63]

DEFINE_EXPECT ( PutProperty_MIMETYPEPROP  )

◆ DEFINE_EXPECT() [44/63]

DEFINE_EXPECT ( QueryInterface_IAuthenticate  )

◆ DEFINE_EXPECT() [45/63]

DEFINE_EXPECT ( QueryInterface_IBindStatusCallback  )

◆ DEFINE_EXPECT() [46/63]

DEFINE_EXPECT ( QueryInterface_IBindStatusCallbackEx  )

◆ DEFINE_EXPECT() [47/63]

DEFINE_EXPECT ( QueryInterface_IBindStatusCallbackHolder  )

◆ DEFINE_EXPECT() [48/63]

DEFINE_EXPECT ( QueryInterface_IHttpNegotiate  )

◆ DEFINE_EXPECT() [49/63]

DEFINE_EXPECT ( QueryInterface_IHttpNegotiate2  )

◆ DEFINE_EXPECT() [50/63]

DEFINE_EXPECT ( QueryInterface_IHttpSecurity  )

◆ DEFINE_EXPECT() [51/63]

DEFINE_EXPECT ( QueryInterface_IInternetProtocol  )

◆ DEFINE_EXPECT() [52/63]

DEFINE_EXPECT ( QueryInterface_IServiceProvider  )

◆ DEFINE_EXPECT() [53/63]

DEFINE_EXPECT ( QueryInterface_IWindowForBindingUI  )

◆ DEFINE_EXPECT() [54/63]

DEFINE_EXPECT ( QueryService_IAuthenticate  )

◆ DEFINE_EXPECT() [55/63]

DEFINE_EXPECT ( QueryService_IHttpSecurity  )

◆ DEFINE_EXPECT() [56/63]

DEFINE_EXPECT ( QueryService_IInternetBindInfo  )

◆ DEFINE_EXPECT() [57/63]

DEFINE_EXPECT ( QueryService_IInternetProtocol  )

◆ DEFINE_EXPECT() [58/63]

DEFINE_EXPECT ( QueryService_IWindowForBindingUI  )

◆ DEFINE_EXPECT() [59/63]

DEFINE_EXPECT ( Read  )

◆ DEFINE_EXPECT() [60/63]

DEFINE_EXPECT ( SetPriority  )

◆ DEFINE_EXPECT() [61/63]

DEFINE_EXPECT ( Start  )

◆ DEFINE_EXPECT() [62/63]

DEFINE_EXPECT ( Terminate  )

◆ DEFINE_EXPECT() [63/63]

DEFINE_EXPECT ( UnlockRequest  )

◆ DEFINE_GUID() [1/3]

DEFINE_GUID ( CLSID_IdentityUnmarshal  ,
0x0000001b  ,
0x0000  ,
0x0000  ,
0xc0  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x00  ,
0x46   
)

◆ DEFINE_GUID() [2/3]

static IUri ** DEFINE_GUID ( GUID_NULL  ,
,
,
,
,
,
,
,
,
,
,
 
)

◆ DEFINE_GUID() [3/3]

DEFINE_GUID ( IID_IBindStatusCallbackHolder  ,
0x79eac9cc  ,
0xbaf9  ,
0x11ce  ,
0x8c  ,
0x82  ,
0x00  ,
0xaa  ,
0x00  ,
0x4b  ,
0xa9  ,
0x0b   
)

◆ HRESULT()

static HRESULT ( WINAPI pCreateAsyncBindCtxEx)
static

◆ HttpNegotiate_AddRef()

static ULONG WINAPI HttpNegotiate_AddRef ( IHttpNegotiate2 iface)
static

Definition at line 1233 of file url.c.

1234{
1235 return 2;
1236}

◆ HttpNegotiate_BeginningTransaction()

static HRESULT WINAPI HttpNegotiate_BeginningTransaction ( IHttpNegotiate2 iface,
LPCWSTR  szURL,
LPCWSTR  szHeaders,
DWORD  dwReserved,
LPWSTR pszAdditionalHeaders 
)
static

Definition at line 1243 of file url.c.

1245{
1247 CHECK_EXPECT2(BeginningTransaction);
1248 else
1249 CHECK_EXPECT(BeginningTransaction);
1250
1251 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1252
1253 ok(!lstrcmpW(szURL, current_url), "szURL != current_url\n");
1254 ok(!dwReserved, "dwReserved=%d, expected 0\n", dwReserved);
1255 ok(pszAdditionalHeaders != NULL, "pszAdditionalHeaders == NULL\n");
1256 if(pszAdditionalHeaders)
1257 ok(*pszAdditionalHeaders == NULL, "*pszAdditionalHeaders != NULL\n");
1258
1259 return S_OK;
1260}
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4242
#define CHECK_EXPECT2(func)
Definition: url.c:55
static HRESULT onsecurityproblem_hres
Definition: url.c:181
static WCHAR current_url[INTERNET_MAX_URL_LENGTH]
Definition: url.c:196
static DWORD thread_id
Definition: url.c:174
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

◆ HttpNegotiate_GetRootSecurityId()

static HRESULT WINAPI HttpNegotiate_GetRootSecurityId ( IHttpNegotiate2 iface,
BYTE pbSecurityId,
DWORD pcbSecurityId,
DWORD_PTR  dwReserved 
)
static

Definition at line 1280 of file url.c.

1282{
1283 static const BYTE sec_id[] = {'h','t','t','p',':','t','e','s','t',1,0,0,0};
1284
1285 CHECK_EXPECT(GetRootSecurityId);
1286
1287 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1288
1289 ok(!dwReserved, "dwReserved=%ld, expected 0\n", dwReserved);
1290 ok(pbSecurityId != NULL, "pbSecurityId == NULL\n");
1291 ok(pcbSecurityId != NULL, "pcbSecurityId == NULL\n");
1292
1293 if(pbSecurityId == (void*)0xdeadbeef)
1294 return E_NOTIMPL;
1295
1296 if(pcbSecurityId) {
1297 ok(*pcbSecurityId == 512, "*pcbSecurityId=%d, expected 512\n", *pcbSecurityId);
1298 *pcbSecurityId = sizeof(sec_id);
1299 }
1300
1301 if(pbSecurityId)
1302 memcpy(pbSecurityId, sec_id, sizeof(sec_id));
1303
1304 return E_FAIL;
1305}
#define E_FAIL
Definition: ddrawi.h:102
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
unsigned char BYTE
Definition: xxhash.c:193

◆ HttpNegotiate_OnResponse()

static HRESULT WINAPI HttpNegotiate_OnResponse ( IHttpNegotiate2 iface,
DWORD  dwResponseCode,
LPCWSTR  szResponseHeaders,
LPCWSTR  szRequestHeaders,
LPWSTR pszAdditionalRequestHeaders 
)
static

Definition at line 1262 of file url.c.

1264{
1265 CHECK_EXPECT(OnResponse);
1266
1267 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1268
1269 ok(dwResponseCode == 200, "dwResponseCode=%d, expected 200\n", dwResponseCode);
1270 ok(szResponseHeaders != NULL, "szResponseHeaders == NULL\n");
1271 ok(szRequestHeaders == NULL, "szRequestHeaders != NULL\n");
1272 /* Note: in protocol.c tests, OnResponse pszAdditionalRequestHeaders _is_ NULL */
1273 ok(pszAdditionalRequestHeaders != NULL, "pszAdditionalHeaders == NULL\n");
1274 if(pszAdditionalRequestHeaders)
1275 ok(*pszAdditionalRequestHeaders == NULL, "*pszAdditionalHeaders != NULL\n");
1276
1277 return S_OK;
1278}

◆ HttpNegotiate_QueryInterface()

static HRESULT WINAPI HttpNegotiate_QueryInterface ( IHttpNegotiate2 iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1220 of file url.c.

1221{
1223 || IsEqualGUID(&IID_IHttpNegotiate, riid)
1224 || IsEqualGUID(&IID_IHttpNegotiate2, riid)) {
1225 *ppv = iface;
1226 return S_OK;
1227 }
1228
1229 ok(0, "unexpected call\n");
1230 return E_NOINTERFACE;
1231}

◆ HttpNegotiate_Release()

static ULONG WINAPI HttpNegotiate_Release ( IHttpNegotiate2 iface)
static

Definition at line 1238 of file url.c.

1239{
1240 return 1;
1241}

◆ HttpSecurity_AddRef()

static ULONG WINAPI HttpSecurity_AddRef ( IHttpSecurity iface)
static

Definition at line 1335 of file url.c.

1336{
1337 return 2;
1338}

◆ HttpSecurity_GetWindow()

static HRESULT WINAPI HttpSecurity_GetWindow ( IHttpSecurity iface,
REFGUID  rguidReason,
HWND phwnd 
)
static

Definition at line 1345 of file url.c.

1346{
1347 if(IsEqualGUID(rguidReason, &IID_IHttpSecurity))
1348 CHECK_EXPECT(GetWindow_IHttpSecurity);
1349 else if(IsEqualGUID(rguidReason, &IID_IWindowForBindingUI))
1350 CHECK_EXPECT2(GetWindow_IWindowForBindingUI);
1351 else if(IsEqualGUID(rguidReason, &IID_ICodeInstall))
1352 CHECK_EXPECT(GetWindow_ICodeInstall);
1353 else
1354 ok(0, "Unexpected rguidReason: %s\n", wine_dbgstr_guid(rguidReason));
1355
1356 *phwnd = NULL;
1357 return S_OK;
1358}

◆ HttpSecurity_OnSecurityProblem()

static HRESULT WINAPI HttpSecurity_OnSecurityProblem ( IHttpSecurity iface,
DWORD  dwProblem 
)
static

Definition at line 1360 of file url.c.

1361{
1362 CHECK_EXPECT(OnSecurityProblem);
1363 if(!security_problem) {
1365 broken(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS) /* Some versions of IE6 */,
1366 "Got problem: %d\n", dwProblem);
1367 security_problem = dwProblem;
1368
1369 if(dwProblem == ERROR_INTERNET_SEC_CERT_ERRORS)
1370 binding_hres = INET_E_SECURITY_PROBLEM;
1371 }else
1372 ok(dwProblem == security_problem, "Got problem: %d\n", dwProblem);
1373
1375}
static DWORD security_problem
Definition: url.c:174
static HRESULT binding_hres
Definition: url.c:180
#define ERROR_INTERNET_SEC_CERT_CN_INVALID
Definition: wininet.h:2026
#define ERROR_INTERNET_SEC_CERT_ERRORS
Definition: wininet.h:2042

◆ HttpSecurity_QueryInterface()

static HRESULT WINAPI HttpSecurity_QueryInterface ( IHttpSecurity iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1318 of file url.c.

1319{
1320 ok(0, "Unexpected call\n");
1321 *ppv = NULL;
1322 if(IsEqualGUID(&IID_IHttpSecurity, riid) ||
1323 IsEqualGUID(&IID_IWindowForBindingUI, riid) ||
1325 {
1326 *ppv = iface;
1327 return S_OK;
1328 }
1329
1330 ok(0, "Unexpected interface requested.\n");
1331
1332 return E_NOINTERFACE;
1333}

◆ HttpSecurity_Release()

static ULONG WINAPI HttpSecurity_Release ( IHttpSecurity iface)
static

Definition at line 1340 of file url.c.

1341{
1342 return 1;
1343}

◆ init_bind_test()

static void init_bind_test ( int  protocol,
DWORD  flags,
DWORD  t 
)
static

Definition at line 2868 of file url.c.

2869{
2870 const char *url_a = NULL;
2871
2879 mime_type[0] = 0;
2882 tymed = t;
2885
2886 switch(protocol) {
2887 case HTTP_TEST:
2888 if(post_test)
2889 url_a = "http://test.winehq.org/tests/post.php";
2890 else
2892 break;
2893 case ABOUT_TEST:
2894 url_a = "about:blank";
2895 break;
2896 case FILE_TEST:
2898 break;
2899 case MK_TEST:
2900 url_a = "mk:@MSITStore:test.chm::/blank.html";
2901 break;
2902 case ITS_TEST:
2903 url_a = "its:test.chm::/blank.html";
2904 break;
2905 case HTTPS_TEST:
2906 url_a = (flags & BINDTEST_INVALID_CN) ? "https://4.15.184.77/favicon.ico" : "https://test.winehq.org/tests/hello.html";
2907 break;
2908 case FTP_TEST:
2909 url_a = "ftp://ftp.winehq.org/welcome%2emsg";
2910 break;
2911 default:
2912 url_a = "winetest:test";
2913 }
2914
2915 if(url_a)
2917
2922 test_abort = (flags & BINDTEST_ABORT) != 0;
2927 prot_state = 0;
2929
2930 trace("URL: %s\n", wine_dbgstr_w(current_url));
2931}
#define trace
Definition: atltest.h:70
#define ARRAY_SIZE(A)
Definition: main.h:33
#define lstrcpyW
Definition: compat.h:749
GLdouble GLdouble t
Definition: gl.h:2047
GLbitfield flags
Definition: glext.h:7161
#define wine_dbgstr_w
Definition: kernel32.h:34
#define BINDTEST_ABORT_START
Definition: url.c:2863
#define BINDTEST_USE_CACHE
Definition: url.c:2858
#define BINDTEST_NO_CALLBACK
Definition: url.c:2860
#define BINDTEST_HTTPRESPONSE
Definition: url.c:2856
static BOOL abort_start
Definition: url.c:189
static BOOL is_async_prot
Definition: url.c:183
#define BINDTEST_NO_CALLBACK_READ
Definition: url.c:2859
static HANDLE complete_event
Definition: url.c:179
static WCHAR file_url[INTERNET_MAX_URL_LENGTH]
Definition: url.c:196
#define BINDTEST_TOOBJECT
Definition: url.c:2854
static BOOL no_callback
Definition: url.c:184
static BOOL bind_to_object
Definition: url.c:173
static const WCHAR winetest_data_urlW[]
Definition: url.c:152
#define BINDTEST_FILEDWLAPI
Definition: url.c:2855
static BOOL post_test
Definition: url.c:173
#define BINDTEST_INVALID_CN
Definition: url.c:2862
#define BINDTEST_EMULATE
Definition: url.c:2853
static BOOL stopped_binding
Definition: url.c:172
#define BINDTEST_REDIRECT
Definition: url.c:2857
static BOOL emulate_protocol
Definition: url.c:172
#define BINDTEST_ASYNC_SWITCH
Definition: url.c:2865
static BOOL test_abort
Definition: url.c:184
static BOOL abort_progress
Definition: url.c:190
static BOOL callback_read
Definition: url.c:184
static DWORD tymed
Definition: url.c:174
#define BINDTEST_ABORT
Definition: url.c:2861
static DWORD bindtest_flags
Definition: url.c:193
static BOOL filedwl_api
Definition: url.c:173
static BOOL async_switch
Definition: url.c:191
static BOOL stopped_obj_binding
Definition: url.c:172
#define BINDTEST_ABORT_PROGRESS
Definition: url.c:2864
static BOOL test_redirect
Definition: url.c:184
static DWORD prot_state
Definition: url.c:174
static BOOL data_available
Definition: url.c:173
static BOOL use_cache_file
Definition: url.c:184
static CHAR mime_type[512]
Definition: url.c:176
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714

Referenced by test_BindToObject(), test_BindToStorage(), test_ReportResult(), test_URLDownloadToFile(), and test_URLDownloadToFile_abort().

◆ is_urlmon_protocol()

static BOOL is_urlmon_protocol ( int  prot)
static

Definition at line 235 of file url.c.

236{
237 return prot == FILE_TEST || prot == HTTP_TEST || prot == HTTPS_TEST || prot == FTP_TEST || prot == MK_TEST;
238}

Referenced by Protocol_QueryInterface(), Protocol_Start(), statusclb_OnProgress(), test_BindToObject(), test_BindToStorage(), test_ReportResult(), and test_URLDownloadToFile().

◆ MonikerProp_AddRef()

static ULONG WINAPI MonikerProp_AddRef ( IMonikerProp iface)
static

Definition at line 2161 of file url.c.

2162{
2163 return 2;
2164}

◆ MonikerProp_PutProperty()

static HRESULT WINAPI MonikerProp_PutProperty ( IMonikerProp iface,
MONIKERPROPERTY  mkp,
LPCWSTR  val 
)
static

Definition at line 2171 of file url.c.

2172{
2173 switch(mkp) {
2174 case MIMETYPEPROP:
2175 CHECK_EXPECT(PutProperty_MIMETYPEPROP);
2176 ok(!lstrcmpW(val, wszTextHtml), "val = %s\n", wine_dbgstr_w(val));
2177 break;
2178 case CLASSIDPROP:
2179 CHECK_EXPECT(PutProperty_CLASSIDPROP);
2180 break;
2181 default:
2182 break;
2183 }
2184
2185 return S_OK;
2186}
GLuint GLfloat * val
Definition: glext.h:7180
static const WCHAR wszTextHtml[]
Definition: url.c:157

◆ MonikerProp_QueryInterface()

static HRESULT WINAPI MonikerProp_QueryInterface ( IMonikerProp iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2154 of file url.c.

2155{
2156 *ppv = NULL;
2157 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
2158 return E_NOINTERFACE;
2159}

◆ MonikerProp_Release()

static ULONG WINAPI MonikerProp_Release ( IMonikerProp iface)
static

Definition at line 2166 of file url.c.

2167{
2168 return 1;
2169}

◆ PersistMoniker_AddRef()

static ULONG WINAPI PersistMoniker_AddRef ( IPersistMoniker iface)
static

Definition at line 2213 of file url.c.

2214{
2215 return 2;
2216}

◆ PersistMoniker_GetClassID()

static HRESULT WINAPI PersistMoniker_GetClassID ( IPersistMoniker iface,
CLSID pClassID 
)
static

Definition at line 2223 of file url.c.

2224{
2225 ok(0, "unexpected call\n");
2226 return E_NOTIMPL;
2227}

◆ PersistMoniker_GetCurMoniker()

static HRESULT WINAPI PersistMoniker_GetCurMoniker ( IPersistMoniker iface,
IMoniker **  pimkName 
)
static

Definition at line 2323 of file url.c.

2324{
2325 ok(0, "unexpected call\n");
2326 return E_NOTIMPL;
2327}

◆ PersistMoniker_IsDirty()

static HRESULT WINAPI PersistMoniker_IsDirty ( IPersistMoniker iface)
static

Definition at line 2229 of file url.c.

2230{
2231 ok(0, "unexpected call\n");
2232 return E_NOTIMPL;
2233}

◆ PersistMoniker_Load()

static HRESULT WINAPI PersistMoniker_Load ( IPersistMoniker iface,
BOOL  fFullyAvailable,
IMoniker pimkName,
LPBC  pibc,
DWORD  grfMode 
)
static

Definition at line 2235 of file url.c.

2237{
2238 IUnknown *unk;
2239 HRESULT hres;
2240
2241 static WCHAR cbinding_contextW[] =
2242 {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0};
2243
2244 CHECK_EXPECT(Load);
2245 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
2246
2248 ok(!fFullyAvailable, "fFullyAvailable = %x\n", fFullyAvailable);
2249 else
2250 ok(fFullyAvailable, "fFullyAvailable = %x\n", fFullyAvailable);
2251 ok(pimkName != NULL, "pimkName == NULL\n");
2252 ok(pibc != NULL, "pibc == NULL\n");
2253 ok(grfMode == 0x12, "grfMode = %x\n", grfMode);
2254
2255 hres = IBindCtx_GetObjectParam(pibc, cbinding_contextW, &unk);
2256 ok(hres == S_OK, "GetObjectParam(CBinding Context) failed: %08x\n", hres);
2257 if(SUCCEEDED(hres)) {
2258 IBinding *binding;
2259
2260 hres = IUnknown_QueryInterface(unk, &IID_IBinding, (void**)&binding);
2261 ok(hres == S_OK, "Could not get IBinding: %08x\n", hres);
2262
2263 IBinding_Release(binding);
2264 IUnknown_Release(unk);
2265 }
2266
2267 SET_EXPECT(QueryInterface_IServiceProvider);
2269 ok(hres == S_OK, "RegisterBindStatusCallback failed: %08x\n", hres);
2270 CHECK_CALLED(QueryInterface_IServiceProvider);
2271
2272 SET_EXPECT(QueryInterface_IBindStatusCallbackEx);
2273 SET_EXPECT(GetBindInfo);
2274 SET_EXPECT(OnStartBinding);
2275 if(test_redirect)
2276 SET_EXPECT(OnProgress_REDIRECTING);
2277 SET_EXPECT(OnProgress_BEGINDOWNLOADDATA);
2279 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
2281 SET_EXPECT(OnProgress_ENDDOWNLOADDATA);
2283 SET_EXPECT(OnDataAvailable);
2285 SET_EXPECT(OnStopBinding);
2286
2287 hres = IMoniker_BindToStorage(pimkName, pibc, NULL, &IID_IStream, (void**)&unk);
2288 ok(hres == S_OK, "Load failed: %08x\n", hres);
2289
2290 CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx); /* IE 8 */
2291 CHECK_CALLED(GetBindInfo);
2292 CHECK_CALLED(OnStartBinding);
2293 if(test_redirect)
2294 CHECK_CALLED(OnProgress_REDIRECTING);
2295 CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA);
2297 CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE);
2299 CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
2301 CHECK_CALLED(OnDataAvailable);
2303 CHECK_CALLED(OnStopBinding);
2304
2305 if(unk)
2306 IUnknown_Release(unk);
2307
2308 return S_OK;
2309}
static WCHAR cbinding_contextW[]
Definition: binding.c:29
PVOID LockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp, BOOLEAN Output, KPROCESSOR_MODE *LockMode)
Definition: lock.c:24
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465
#define SET_EXPECT(func)
Definition: url.c:52
#define CLEAR_CALLED(func)
Definition: url.c:85
static IBindStatusCallbackEx bsc
Definition: url.c:2150
#define CHECK_CALLED(func)
Definition: url.c:67
HRESULT WINAPI RegisterBindStatusCallback(IBindCtx *pbc, IBindStatusCallback *pbsc, IBindStatusCallback **ppbscPrevious, DWORD dwReserved)
Definition: bindctx.c:615
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ PersistMoniker_QueryInterface()

static HRESULT WINAPI PersistMoniker_QueryInterface ( IPersistMoniker iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2197 of file url.c.

2198{
2199 *ppv = NULL;
2200
2201 if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IPersistMoniker, riid))
2202 *ppv = iface;
2203 else if(IsEqualGUID(&IID_IMonikerProp, riid))
2204 *ppv = &MonikerProp;
2205
2206 if(*ppv)
2207 return S_OK;
2208
2209 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
2210 return E_NOINTERFACE;
2211}
static IMonikerProp MonikerProp
Definition: url.c:2195

◆ PersistMoniker_Release()

static ULONG WINAPI PersistMoniker_Release ( IPersistMoniker iface)
static

Definition at line 2218 of file url.c.

2219{
2220 return 1;
2221}

◆ PersistMoniker_Save()

static HRESULT WINAPI PersistMoniker_Save ( IPersistMoniker iface,
IMoniker pimkName,
LPBC  pbc,
BOOL  fRemember 
)
static

Definition at line 2311 of file url.c.

2312{
2313 ok(0, "unexpected call\n");
2314 return E_NOTIMPL;
2315}

◆ PersistMoniker_SaveCompleted()

static HRESULT WINAPI PersistMoniker_SaveCompleted ( IPersistMoniker iface,
IMoniker pimkName,
LPBC  pibc 
)
static

Definition at line 2317 of file url.c.

2318{
2319 ok(0, "unexpected call\n");
2320 return E_NOTIMPL;
2321}

◆ Priority_AddRef()

static ULONG WINAPI Priority_AddRef ( IInternetPriority iface)
static

Definition at line 334 of file url.c.

335{
336 return 2;
337}

◆ Priority_GetPriority()

static HRESULT WINAPI Priority_GetPriority ( IInternetPriority iface,
LONG pnPriority 
)
static

Definition at line 351 of file url.c.

352{
353 ok(0, "unexpected call\n");
354 return S_OK;
355}

◆ Priority_QueryInterface()

static HRESULT WINAPI Priority_QueryInterface ( IInternetPriority iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 328 of file url.c.

329{
330 ok(0, "unexpected call\n");
331 return E_NOINTERFACE;
332}

◆ Priority_Release()

static ULONG WINAPI Priority_Release ( IInternetPriority iface)
static

Definition at line 339 of file url.c.

340{
341 return 1;
342}

◆ Priority_SetPriority()

static HRESULT WINAPI Priority_SetPriority ( IInternetPriority iface,
LONG  nPriority 
)
static

Definition at line 344 of file url.c.

345{
347 ok(!nPriority, "nPriority = %d\n", nPriority);
348 return S_OK;
349}
@ SetPriority
Definition: halhw.h:216

◆ Protocol_Abort()

static HRESULT WINAPI Protocol_Abort ( IInternetProtocol iface,
HRESULT  hrReason,
DWORD  dwOptions 
)
static

Definition at line 1056 of file url.c.

1058{
1059 HRESULT hres;
1060
1061 CHECK_EXPECT(Abort);
1062
1063 ok(hrReason == E_ABORT, "hrReason = %08x\n", hrReason);
1064 ok(!dwOptions, "dwOptions = %x\n", dwOptions);
1065
1066 hres = IInternetProtocolSink_ReportResult(protocol_sink, E_ABORT, ERROR_SUCCESS, NULL);
1067 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
1068
1069 return S_OK;
1070}
#define ERROR_SUCCESS
Definition: deptool.c:10
static IInternetProtocolSink * protocol_sink
Definition: url.c:177
DWORD dwOptions
Definition: solitaire.cpp:25
#define E_ABORT
Definition: winerror.h:2366

◆ Protocol_AddRef()

static ULONG WINAPI Protocol_AddRef ( IInternetProtocol iface)
static

Definition at line 398 of file url.c.

399{
400 return 2;
401}

◆ Protocol_Continue()

static HRESULT WINAPI Protocol_Continue ( IInternetProtocol iface,
PROTOCOLDATA *  pProtocolData 
)
static

Definition at line 925 of file url.c.

927{
928 DWORD bscf = 0;
930
931 CHECK_EXPECT(Continue);
932
933 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
934
935 if(!bind_to_object)
937
938 ok(pProtocolData != NULL, "pProtocolData == NULL\n");
939 if(!pProtocolData)
940 return S_OK;
941
942 switch(prot_state) {
943 case 0:
944 hres = IInternetProtocolSink_ReportProgress(protocol_sink,
945 BINDSTATUS_SENDINGREQUEST, NULL);
946 ok(hres == S_OK, "ReportProgress failed: %08x\n", hres);
947
948 hres = IInternetProtocolSink_ReportProgress(protocol_sink,
949 BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml);
950 ok(hres == S_OK,
951 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
952
953 bscf |= BSCF_FIRSTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION;
954 break;
955 case 1: {
958 static const WCHAR header[] = {'?',0};
959
960 hres = IInternetProtocolSink_QueryInterface(protocol_sink, &IID_IServiceProvider,
961 (void**)&service_provider);
962 ok(hres == S_OK, "Could not get IServiceProvicder\n");
963
964 hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate,
965 &IID_IHttpNegotiate, (void**)&http_negotiate);
966 ok(hres == S_OK, "Could not get IHttpNegotiate\n");
967
968 if(!no_callback) {
969 SET_EXPECT(QueryInterface_IHttpNegotiate);
970 SET_EXPECT(OnResponse);
971 }
972 hres = IHttpNegotiate_OnResponse(http_negotiate, 200, header, NULL, NULL);
973 if(!no_callback) {
974 CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate);
975 CHECK_CALLED(OnResponse);
976 }
977 IHttpNegotiate_Release(http_negotiate);
978 ok(hres == S_OK, "OnResponse failed: %08x\n", hres);
979
981 hres = IInternetProtocolSink_ReportProgress(protocol_sink, BINDSTATUS_ACCEPTRANGES, NULL);
982 ok(hres == S_OK, "ReportProgress(BINDSTATUS_ACCEPTRANGES) failed: %08x\n", hres);
983 }
984
985 hres = IInternetProtocolSink_ReportProgress(protocol_sink,
986 BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml);
987 ok(hres == S_OK,
988 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
989
990 hres = IInternetProtocolSink_ReportProgress(protocol_sink,
991 BINDSTATUS_CACHEFILENAMEAVAILABLE, use_cache_file ? cache_file_name : cache_fileW);
992 ok(hres == S_OK, "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres);
993
994 bscf |= BSCF_FIRSTDATANOTIFICATION;
995 break;
996 }
997 case 2:
998 case 3:
999 bscf = BSCF_INTERMEDIATEDATANOTIFICATION;
1000 break;
1001 }
1002
1003 hres = IInternetProtocolSink_ReportData(protocol_sink, bscf, 100, 400);
1004 ok(hres == S_OK, "ReportData failed: %08x\n", hres);
1005
1006 if(prot_state != 2 || !test_abort)
1008 switch(prot_state) {
1009 case 0:
1010 hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL);
1011 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
1012 SET_EXPECT(OnProgress_SENDINGREQUEST);
1013 SET_EXPECT(OnProgress_MIMETYPEAVAILABLE);
1014 SET_EXPECT(OnProgress_BEGINDOWNLOADDATA);
1016 SET_EXPECT(OnStopBinding);
1017 break;
1018 case 1:
1019 if(bind_to_object) {
1020 SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
1021 SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA);
1022 SET_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE);
1023 SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
1024 SET_EXPECT(CreateInstance);
1025 SET_EXPECT(PutProperty_MIMETYPEPROP);
1026 SET_EXPECT(PutProperty_CLASSIDPROP);
1027 SET_EXPECT(Load);
1028 SET_EXPECT(Obj_OnProgress_ENDSYNCOPERATION);
1029 SET_EXPECT(OnObjectAvailable);
1030 SET_EXPECT(Obj_OnStopBinding);
1031 }else if(!no_callback) {
1032 SET_EXPECT(OnProgress_MIMETYPEAVAILABLE);
1033 SET_EXPECT(OnProgress_BEGINDOWNLOADDATA);
1035 }else {
1037 }
1038 break;
1039 case 2:
1040 if(!no_callback)
1041 SET_EXPECT(OnProgress_DOWNLOADINGDATA);
1042 break;
1043 case 3:
1044 SET_EXPECT(OnProgress_DOWNLOADINGDATA);
1045 SET_EXPECT(OnProgress_ENDDOWNLOADDATA);
1046 }
1047 if(!no_callback) {
1048 if((!bind_to_object || prot_state >= 2) && (!test_abort || prot_state != 2))
1049 SET_EXPECT(OnDataAvailable);
1050 if(prot_state == 3 || (test_abort && prot_state == 2))
1051 SET_EXPECT(OnStopBinding);
1052 }
1053 return S_OK;
1054}
static IServiceProvider service_provider
Definition: mimeole.c:1313
static IHttpNegotiate2 http_negotiate
Definition: protocol.c:395
static const WCHAR cache_fileW[]
Definition: url.c:166
static const WCHAR * reported_url
Definition: url.c:175
#define CHECK_CALLED_BROKEN(func)
Definition: url.c:79
_In_ BOOLEAN Read
Definition: strmini.h:479

◆ Protocol_LockRequest()

static HRESULT WINAPI Protocol_LockRequest ( IInternetProtocol iface,
DWORD  dwOptions 
)
static

Definition at line 1188 of file url.c.

1189{
1191 if(no_callback)
1193 return S_OK;
1194}
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733

◆ Protocol_QueryInterface()

static HRESULT WINAPI Protocol_QueryInterface ( IInternetProtocol iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 367 of file url.c.

368{
369 static const IID IID_undocumentedIE10 = {0x7daf9908,0x8415,0x4005,{0x95,0xae,0xbd,0x27,0xf6,0xe3,0xdc,0x00}};
370
371 *ppv = NULL;
372
373 if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) {
374 *ppv = iface;
375 return S_OK;
376 }
377
378 if(IsEqualGUID(&IID_IInternetPriority, riid)) {
380 return E_NOINTERFACE;
381
383 return S_OK;
384 }
385
386 if(IsEqualGUID(&IID_IInternetProtocolEx, riid))
387 return E_NOINTERFACE; /* TODO */
388
389 if(IsEqualGUID(&IID_undocumentedIE10, riid)) {
390 trace("QI(%s)\n", wine_dbgstr_guid(riid));
391 return E_NOINTERFACE; /* TODO */
392 }
393
394 ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid));
395 return E_NOINTERFACE;
396}
static IInternetPriority InternetPriority
Definition: url.c:365
static BOOL is_urlmon_protocol(int prot)
Definition: url.c:235

◆ Protocol_Read()

static HRESULT WINAPI Protocol_Read ( IInternetProtocol iface,
void pv,
ULONG  cb,
ULONG pcbRead 
)
static

Definition at line 1100 of file url.c.

1102{
1103 HRESULT hres;
1104
1105 static const char data[] = "<HTML></HTML>";
1106
1108
1109 ok(pv != NULL, "pv == NULL\n");
1110 ok(cb != 0, "cb == 0\n");
1111 ok(pcbRead != NULL, "pcbRead == NULL\n");
1112
1113 if(async_switch) {
1114 if(prot_state++ > 1) {
1115 *pcbRead = 0;
1116 return S_FALSE;
1117 } else {
1118 memset(pv, '?', cb);
1119 *pcbRead = cb;
1120 return S_OK;
1121 }
1122 }
1123
1125 static BOOL pending = TRUE;
1126
1127 pending = !pending;
1128
1129 switch(prot_state) {
1130 case 1:
1131 case 2:
1132 if(pending) {
1133 *pcbRead = 10;
1134 memset(pv, '?', 10);
1135 if(prot_state == 2 && no_callback)
1137 return E_PENDING;
1138 }else {
1139 memset(pv, '?', cb);
1140 *pcbRead = cb;
1141 read++;
1142 return S_OK;
1143 }
1144 case 3:
1145 prot_state++;
1146
1147 *pcbRead = 0;
1148
1149 hres = IInternetProtocolSink_ReportData(protocol_sink,
1150 BSCF_LASTDATANOTIFICATION|BSCF_INTERMEDIATEDATANOTIFICATION, 2000, 2000);
1151 ok(hres == S_OK, "ReportData failed: %08x\n", hres);
1152
1153 hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL);
1154 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
1155
1156 return S_FALSE;
1157 case 4:
1158 *pcbRead = 0;
1159 return S_FALSE;
1160 }
1161 }
1162
1163 if(read) {
1164 *pcbRead = 0;
1165 return S_FALSE;
1166 }
1167
1169 hres = IInternetProtocolSink_ReportResult(protocol_sink, S_OK, 0, NULL);
1170 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
1171
1172 SET_EXPECT(OnStopBinding);
1173 }
1174
1175 ok(*pcbRead == 0, "*pcbRead=%d, expected 0\n", *pcbRead);
1176 read += *pcbRead = sizeof(data)-1;
1177 memcpy(pv, data, sizeof(data));
1178 return S_OK;
1179}
#define E_PENDING
Definition: dinput.h:172
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
static DWORD read
Definition: url.c:174
#define S_FALSE
Definition: winerror.h:2357

◆ Protocol_Release()

static ULONG WINAPI Protocol_Release ( IInternetProtocol iface)
static

Definition at line 403 of file url.c.

404{
405 return 1;
406}

◆ Protocol_Resume()

static HRESULT WINAPI Protocol_Resume ( IInternetProtocol iface)
static

Definition at line 1094 of file url.c.

1095{
1096 ok(0, "unexpected call\n");
1097 return E_NOTIMPL;
1098}

◆ Protocol_Seek()

static HRESULT WINAPI Protocol_Seek ( IInternetProtocol iface,
LARGE_INTEGER  dlibMove,
DWORD  dwOrigin,
ULARGE_INTEGER plibNewPosition 
)
static

Definition at line 1181 of file url.c.

1183{
1184 ok(0, "unexpected call\n");
1185 return E_NOTIMPL;
1186}

◆ Protocol_Start()

static HRESULT WINAPI Protocol_Start ( IInternetProtocol iface,
LPCWSTR  szUrl,
IInternetProtocolSink pOIProtSink,
IInternetBindInfo pOIBindInfo,
DWORD  grfPI,
HANDLE_PTR  dwReserved 
)
static

Definition at line 580 of file url.c.

583{
584 BINDINFO bindinfo;
585 DWORD bind_info, bscf = BSCF_FIRSTDATANOTIFICATION | BSCF_LASTDATANOTIFICATION;
587
588 static const STGMEDIUM stgmed_zero = {0};
589 static const SECURITY_ATTRIBUTES sa_zero = {0};
590
592
593 read = 0;
594
595 reported_url = szUrl;
596 if(!filedwl_api) /* FIXME */
597 ok(szUrl && !lstrcmpW(szUrl, current_url), "wrong url %s\n", wine_dbgstr_w(szUrl));
598 ok(pOIProtSink != NULL, "pOIProtSink == NULL\n");
599 ok(pOIBindInfo != NULL, "pOIBindInfo == NULL\n");
600 ok(grfPI == 0, "grfPI=%d, expected 0\n", grfPI);
601 ok(dwReserved == 0, "dwReserved=%lx, expected 0\n", dwReserved);
602
603 if(!filedwl_api && binding_hres != S_OK) {
604 SET_EXPECT(OnStopBinding);
605 SET_EXPECT(Terminate);
606 hres = IInternetProtocolSink_ReportResult(pOIProtSink, binding_hres, 0, NULL);
607 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
608 CHECK_CALLED(OnStopBinding);
609 CHECK_CALLED(Terminate);
610
611 return S_OK;
612 }
613
614 memset(&bindinfo, 0, sizeof(bindinfo));
615 bindinfo.cbSize = 0;
616 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo);
617 ok(hres == E_INVALIDARG, "GetBindInfo returned: %08x, expected E_INVALIDARG\n", hres);
618
619 memset(&bindinfo, 0, sizeof(bindinfo));
620 bindinfo.cbSize = sizeof(bindinfo);
621 hres = IInternetBindInfo_GetBindInfo(pOIBindInfo, &bind_info, &bindinfo);
622 ok(hres == S_OK, "GetBindInfo failed: %08x\n", hres);
623
624 ok(bind_info & BINDF_FROMURLMON, "BINDF_FROMURLMON is not set\n");
625
626 if(filedwl_api || !is_urlmon_protocol(test_protocol) || tymed != TYMED_ISTREAM ||
627 !(bindf&BINDF_ASYNCSTORAGE) || !(bindf&BINDF_PULLDATA))
628 ok(bind_info & BINDF_NEEDFILE, "BINDF_NEEDFILE is not set\n");
629 else if(test_protocol != MK_TEST) /* IE10 sets BINDF_NEEDFILE for mk: protocol */
630 ok(!(bind_info & BINDF_NEEDFILE), "BINDF_NEEDFILE is set\n");
631
632 bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON);
634 ok(bind_info == BINDF_PULLDATA, "bind_info = %x, expected BINDF_PULLDATA\n", bind_info);
635 else
636 ok(bind_info == (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)), "bind_info = %x, expected %x\n",
637 bind_info, (bindf & ~(BINDF_NEEDFILE|BINDF_FROMURLMON)));
638
639 ok(bindinfo.cbSize == sizeof(bindinfo), "bindinfo.cbSize = %d\n", bindinfo.cbSize);
640 ok(!bindinfo.szExtraInfo, "bindinfo.szExtraInfo = %p\n", bindinfo.szExtraInfo);
641 ok(!memcmp(&bindinfo.stgmedData, &stgmed_zero, sizeof(STGMEDIUM)), "wrong stgmedData\n");
642 ok(!bindinfo.grfBindInfoF, "bindinfo.grfBindInfoF = %d\n", bindinfo.grfBindInfoF);
643 ok(!bindinfo.dwBindVerb, "bindinfo.dwBindVerb = %d\n", bindinfo.dwBindVerb);
644 ok(!bindinfo.szCustomVerb, "bindinfo.szCustomVerb = %p\n", bindinfo.szCustomVerb);
645 ok(!bindinfo.cbstgmedData, "bindinfo.cbstgmedData = %d\n", bindinfo.cbstgmedData);
646 ok(bindinfo.dwOptions == (bind_to_object ? 0x100000 : 0), "bindinfo.dwOptions = %x\n", bindinfo.dwOptions);
647 ok(!bindinfo.dwOptionsFlags, "bindinfo.dwOptionsFlags = %d\n", bindinfo.dwOptionsFlags);
648 ok(!bindinfo.dwCodePage, "bindinfo.dwCodePage = %d\n", bindinfo.dwCodePage);
649 ok(!memcmp(&bindinfo.securityAttributes, &sa_zero, sizeof(sa_zero)), "wrong bindinfo.securityAttributes\n");
650 ok(IsEqualGUID(&bindinfo.iid, &IID_NULL), "wrong bindinfo.iid\n");
651 ok(!bindinfo.pUnk, "bindinfo.pUnk = %p\n", bindinfo.pUnk);
652 ok(!bindinfo.dwReserved, "bindinfo.dwReserved = %d\n", bindinfo.dwReserved);
653
655 return E_FAIL;
656
657 switch(test_protocol) {
658 case MK_TEST:
659 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
660 BINDSTATUS_DIRECTBIND, NULL);
661 ok(hres == S_OK,
662 "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres);
663
664 case FILE_TEST:
665 case ITS_TEST:
667 SET_EXPECT(Obj_OnProgress_SENDINGREQUEST);
668 else
669 SET_EXPECT(OnProgress_SENDINGREQUEST);
670 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
671 BINDSTATUS_SENDINGREQUEST, emptyW);
672 ok(hres == S_OK,
673 "ReportProgress(BINDSTATUS_SENDINGREQUEST) failed: %08x\n", hres);
675 CHECK_CALLED(Obj_OnProgress_SENDINGREQUEST);
676 else
677 CHECK_CALLED(OnProgress_SENDINGREQUEST);
679 IInternetProtocolSink_AddRef(pOIProtSink);
680 protocol_sink = pOIProtSink;
681 default:
682 break;
683 }
684
688 IHttpNegotiate2 *http_negotiate2;
690 LPWSTR ua = (LPWSTR)0xdeadbeef, accept_mimes[256];
691 LPWSTR additional_headers = (LPWSTR)0xdeadbeef;
692 BYTE sec_id[100];
693 DWORD fetched = 256, size = 100;
694 DWORD tid;
695
696 static const WCHAR wszMimes[] = {'*','/','*',0};
697
698 SET_EXPECT(QueryService_IInternetBindInfo);
699 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT,
700 &ua, 1, &fetched);
701 CLEAR_CALLED(QueryService_IInternetBindInfo); /* IE <8 */
702
704 "GetBindString(BINDSTRING_USER_AGETNT) failed: %08x\n", hres);
705 ok(fetched == 256, "fetched = %d, expected 254\n", fetched);
706 ok(ua == (LPWSTR)0xdeadbeef, "ua = %p\n", ua);
707
708 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
709 accept_mimes, 256, &fetched);
710 ok(hres == S_OK,
711 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres);
712 ok(fetched == 1, "fetched = %d, expected 1\n", fetched);
713 ok(!lstrcmpW(wszMimes, accept_mimes[0]), "unexpected mimes\n");
714 CoTaskMemFree(accept_mimes[0]);
715
716 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
717 NULL, 256, &fetched);
719 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres);
720
721 hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_ACCEPT_MIMES,
722 accept_mimes, 256, NULL);
724 "GetBindString(BINDSTRING_ACCEPT_MIMES) failed: %08x\n", hres);
725
726 hres = IInternetBindInfo_QueryInterface(pOIBindInfo, &IID_IServiceProvider,
727 (void**)&service_provider);
728 ok(hres == S_OK, "QueryInterface failed: %08x\n", hres);
729
730 SET_EXPECT(QueryInterface_IHttpNegotiate);
731 hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate,
732 &IID_IHttpNegotiate, (void**)&http_negotiate);
733 CLEAR_CALLED(QueryInterface_IHttpNegotiate); /* IE <8 */
734 ok(hres == S_OK, "QueryService failed: %08x\n", hres);
735
736 if(!no_callback) {
737 SET_EXPECT(BeginningTransaction);
738 SET_EXPECT(QueryInterface_IHttpNegotiate);
739 }
740 hres = IHttpNegotiate_BeginningTransaction(http_negotiate, current_url,
741 NULL, 0, &additional_headers);
742 if(!no_callback) {
743 CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate);
744 CHECK_CALLED(BeginningTransaction);
745 }
746 IHttpNegotiate_Release(http_negotiate);
747 ok(hres == S_OK, "BeginningTransction failed: %08x\n", hres);
748 ok(additional_headers == NULL, "additional_headers=%p\n", additional_headers);
749
750 SET_EXPECT(QueryInterface_IHttpNegotiate2);
751 hres = IServiceProvider_QueryService(service_provider, &IID_IHttpNegotiate2,
752 &IID_IHttpNegotiate2, (void**)&http_negotiate2);
753 CLEAR_CALLED(QueryInterface_IHttpNegotiate2); /* IE <8 */
754 ok(hres == S_OK, "QueryService failed: %08x\n", hres);
755
756 size = 512;
757 if(!no_callback) {
758 SET_EXPECT(QueryInterface_IHttpNegotiate2);
759 SET_EXPECT(GetRootSecurityId);
760 }
761 hres = IHttpNegotiate2_GetRootSecurityId(http_negotiate2, sec_id, &size, 0);
762 if(!no_callback) {
763 CHECK_CALLED_BROKEN(QueryInterface_IHttpNegotiate2);
764 CHECK_CALLED(GetRootSecurityId);
765 }
766 IHttpNegotiate2_Release(http_negotiate2);
767 ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n", hres);
768 ok(size == (no_callback ? 512 : 13), "size=%d\n", size);
769
770 if(!no_callback) {
771 SET_EXPECT(QueryService_IHttpSecurity);
772 SET_EXPECT(QueryInterface_IHttpSecurity);
773 }
774 hres = IServiceProvider_QueryService(service_provider, &IID_IHttpSecurity,
775 &IID_IHttpSecurity, (void**)&http_security);
776 ok(hres == (no_callback ? E_NOINTERFACE : S_OK), "QueryService failed: 0x%08x\n", hres);
777 if(!no_callback) {
778 CHECK_CALLED(QueryService_IHttpSecurity);
779 CHECK_CALLED(QueryInterface_IHttpSecurity);
780 }
781
782 IServiceProvider_Release(service_provider);
783
784 IInternetProtocolSink_AddRef(pOIProtSink);
785 protocol_sink = pOIProtSink;
786
787 if(async_switch) {
788 PROTOCOLDATA data;
789
790 memset(&data, 0, sizeof(data));
791 data.grfFlags = PI_FORCE_ASYNC;
792 prot_state = 0;
793 hres = IInternetProtocolSink_Switch(pOIProtSink, &data);
794 ok(hres == S_OK, "Switch failed: %08x\n", hres);
795 SET_EXPECT(Continue);
797 return E_PENDING;
798 } else {
800 return S_OK;
801 }
802 }
803
804 if(test_protocol == FILE_TEST) {
805 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
806 BINDSTATUS_CACHEFILENAMEAVAILABLE, file_url+7);
807 ok(hres == S_OK,
808 "ReportProgress(BINDSTATUS_CACHEFILENAMEAVAILABLE) failed: %08x\n", hres);
809
811 SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
812 else
813 SET_EXPECT(OnProgress_MIMETYPEAVAILABLE);
814 hres = IInternetProtocolSink_ReportProgress(pOIProtSink,
815 BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml);
816 ok(hres == S_OK,
817 "ReportProgress(BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE) failed: %08x\n", hres);
819 CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE);
820 else
821 CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE);
822 }else if(test_protocol == WINETEST_SYNC_TEST) {
823 SET_EXPECT(OnProgress_MIMETYPEAVAILABLE);
824 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE, wszTextHtml);
825 ok(hres == S_OK,
826 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
827 CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE);
828 }else {
829 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_MIMETYPEAVAILABLE, wszTextHtml);
830 ok(hres == S_OK,
831 "ReportProgress(BINDSTATUS_MIMETYPEAVAILABLE) failed: %08x\n", hres);
832 }
833
835 bscf |= BSCF_DATAFULLYAVAILABLE;
837 bscf = BSCF_FIRSTDATANOTIFICATION|BSCF_DATAFULLYAVAILABLE;
838
840 if(bind_to_object) {
842 SET_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
843 SET_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA);
845 SET_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
846 SET_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA);
847 SET_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE);
848 SET_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
849 SET_EXPECT(CreateInstance);
850 SET_EXPECT(PutProperty_MIMETYPEPROP);
851 SET_EXPECT(PutProperty_CLASSIDPROP);
852 SET_EXPECT(Load);
853 SET_EXPECT(Obj_OnProgress_ENDSYNCOPERATION);
854 SET_EXPECT(OnObjectAvailable);
855 SET_EXPECT(Obj_OnStopBinding);
856 }else {
858 SET_EXPECT(OnProgress_MIMETYPEAVAILABLE);
859 SET_EXPECT(OnProgress_BEGINDOWNLOADDATA);
861 SET_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
862 SET_EXPECT(OnProgress_ENDDOWNLOADDATA);
864 if(!filedwl_api)
865 SET_EXPECT(OnDataAvailable);
866 if(test_protocol != WINETEST_SYNC_TEST) /* Set in Read after ReportResult call */
867 SET_EXPECT(OnStopBinding);
868 }
869
870 hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13);
871 ok(hres == S_OK, "ReportData failed: %08x\n", hres);
872
874 if(bind_to_object) {
876 CHECK_CALLED(Obj_OnProgress_MIMETYPEAVAILABLE);
877 CHECK_CALLED(Obj_OnProgress_BEGINDOWNLOADDATA);
879 CHECK_CALLED(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
880 CHECK_CALLED(Obj_OnProgress_ENDDOWNLOADDATA);
881 CHECK_CALLED(Obj_OnProgress_CLASSIDAVAILABLE);
882 CHECK_CALLED(Obj_OnProgress_BEGINSYNCOPERATION);
883 CHECK_CALLED(CreateInstance);
884 CHECK_CALLED(PutProperty_MIMETYPEPROP);
885 CHECK_CALLED_BROKEN(PutProperty_CLASSIDPROP);
886 CHECK_CALLED(Load);
887 CHECK_CALLED(Obj_OnProgress_ENDSYNCOPERATION);
888 CHECK_CALLED(OnObjectAvailable);
889 CHECK_CALLED(Obj_OnStopBinding);
890 }else {
892 CHECK_CALLED(OnProgress_MIMETYPEAVAILABLE);
893 CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA);
895 CHECK_CALLED(OnProgress_CACHEFILENAMEAVAILABLE);
896 CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
898 if(!filedwl_api)
899 CHECK_CALLED(OnDataAvailable);
900 CHECK_CALLED(OnStopBinding);
901 }
902
903 if(test_protocol == ITS_TEST) {
905 hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL);
906 ok(hres == S_OK, "ReportProgress(BINDSTATUS_BEGINDOWNLOADDATA) failed: %08x\n", hres);
908 }else if(!bind_to_object && test_protocol == FILE_TEST) {
910 hres = IInternetProtocolSink_ReportData(pOIProtSink, bscf, 13, 13);
911 ok(hres == S_OK, "ReportData failed: %08x\n", hres);
913 }
914
916 SET_EXPECT(Terminate);
917 hres = IInternetProtocolSink_ReportResult(pOIProtSink, S_OK, 0, NULL);
918 ok(hres == S_OK, "ReportResult failed: %08x\n", hres);
919 CHECK_CALLED(Terminate);
920 }
921
922 return S_OK;
923}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define E_INVALIDARG
Definition: ddrawi.h:101
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
static IInternetBindInfo bind_info
Definition: mimeole.c:1273
static TfClientId tid
static IHttpSecurity http_security
Definition: protocol.c:294
static HANDLE complete_event2
Definition: url.c:179
static BOOL only_check_prot_args
Definition: url.c:187
static DWORD WINAPI thread_proc(PVOID arg)
Definition: url.c:430
static const WCHAR emptyW[]
Definition: url.c:170
static DWORD bindf
Definition: url.c:174
#define IID_NULL
Definition: guiddef.h:98
@ Start
Definition: partlist.h:33
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ Protocol_Suspend()

static HRESULT WINAPI Protocol_Suspend ( IInternetProtocol iface)
static

Definition at line 1088 of file url.c.

1089{
1090 ok(0, "unexpected call\n");
1091 return E_NOTIMPL;
1092}

◆ Protocol_Terminate()

static HRESULT WINAPI Protocol_Terminate ( IInternetProtocol iface,
DWORD  dwOptions 
)
static

Definition at line 1072 of file url.c.

1073{
1074 CHECK_EXPECT(Terminate);
1075
1076 ok(dwOptions == 0, "dwOptions=%d, expected 0\n", dwOptions);
1077
1078 if(protocol_sink) {
1079 IInternetProtocolSink_Release(protocol_sink);
1081 }
1082
1083 if(no_callback)
1085 return S_OK;
1086}

◆ Protocol_UnlockRequest()

static HRESULT WINAPI Protocol_UnlockRequest ( IInternetProtocol iface)
static

Definition at line 1196 of file url.c.

1197{
1199 return S_OK;
1200}
VOID UnlockRequest(PIRP Irp, PIO_STACK_LOCATION IrpSp)
Definition: lock.c:180

◆ ProtocolCF_CreateInstance()

static HRESULT WINAPI ProtocolCF_CreateInstance ( IClassFactory iface,
IUnknown outer,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2412 of file url.c.

2413{
2414 if(IsEqualGUID(&IID_IInternetProtocolInfo, riid))
2415 return E_NOINTERFACE;
2416
2417 ok(outer != NULL, "outer == NULL\n");
2418 ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
2419 *ppv = &Protocol;
2420 return S_OK;
2421}
static IInternetProtocol Protocol
Definition: url.c:1218

◆ ProtocolCF_QueryInterface()

static HRESULT WINAPI ProtocolCF_QueryInterface ( IClassFactory iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 2396 of file url.c.

2397{
2398 *ppv = NULL;
2399
2401 *ppv = iface;
2402 return S_OK;
2403 }
2404
2405 if(IsEqualGUID(&IID_IInternetProtocolInfo, riid))
2406 return E_NOINTERFACE;
2407
2408 ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
2409 return E_NOTIMPL;
2410}

◆ proxy_active()

static BOOL proxy_active ( void  )
static

Definition at line 216 of file url.c.

217{
220 DWORD size;
221
222 if (RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings",
224 return FALSE;
225
226 size = sizeof(DWORD);
228 proxy_enable = 0;
229
231
232 return proxy_enable != 0;
233}
#define RegCloseKey(hKey)
Definition: registry.h:49
static const WCHAR proxy_enable[]
Definition: connections.c:39
static const WCHAR internet_settings[]
Definition: connections.c:35
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
Definition: reg.c:3298
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
#define DWORD
Definition: nt_native.h:44
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by test_BindToStorage().

◆ register_protocols()

static void register_protocols ( void  )
static

Definition at line 3878 of file url.c.

3879{
3881 HRESULT hres;
3882
3883 static const WCHAR winetestW[] = {'w','i','n','e','t','e','s','t',0};
3884
3886 ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
3887 if(FAILED(hres))
3888 return;
3889
3890 hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL,
3891 winetestW, 0, NULL, 0);
3892 ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
3893
3894 IInternetSession_Release(session);
3895}
HRESULT WINAPI CoInternetGetSession(DWORD dwSessionMode, IInternetSession **ppIInternetSession, DWORD dwReserved)
Definition: session.c:485
#define FAILED(hr)
Definition: intsafe.h:51
static IClassFactory protocol_cf
Definition: url.c:2431
static const WCHAR winetestW[]
Definition: shelldispatch.c:47

Referenced by START_TEST().

◆ ServiceProvider_AddRef()

static ULONG WINAPI ServiceProvider_AddRef ( IServiceProvider iface)
static

Definition at line 1393 of file url.c.

1394{
1395 return 2;
1396}

◆ ServiceProvider_QueryInterface()

static HRESULT WINAPI ServiceProvider_QueryInterface ( IServiceProvider iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1387 of file url.c.

1388{
1389 ok(0, "unexpected call\n");
1390 return E_NOINTERFACE;
1391}

◆ ServiceProvider_QueryService()

static HRESULT WINAPI ServiceProvider_QueryService ( IServiceProvider iface,
REFGUID  guidService,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1403 of file url.c.

1405{
1406 if(IsEqualGUID(&IID_IAuthenticate, guidService)) {
1407 CHECK_EXPECT(QueryService_IAuthenticate);
1408 return E_NOTIMPL;
1409 }
1410
1411 if(IsEqualGUID(&IID_IInternetProtocol, guidService)) {
1412 CHECK_EXPECT2(QueryService_IInternetProtocol);
1413 return E_NOTIMPL;
1414 }
1415
1416 if(IsEqualGUID(&IID_IInternetBindInfo, guidService)) {
1417 CHECK_EXPECT(QueryService_IInternetBindInfo);
1418 return E_NOTIMPL;
1419 }
1420
1421 if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) {
1422 CHECK_EXPECT2(QueryService_IWindowForBindingUI);
1423 *ppv = &HttpSecurity;
1424 return S_OK;
1425 }
1426
1427 if(IsEqualGUID(&IID_IHttpSecurity, guidService)) {
1428 CHECK_EXPECT(QueryService_IHttpSecurity);
1429 *ppv = &HttpSecurity;
1430 return S_OK;
1431 }
1432
1433 if(IsEqualGUID(&IID_IGetBindHandle, guidService)) {
1434 trace("QueryService(IID_IGetBindHandle)\n");
1435 *ppv = NULL;
1436 return E_NOINTERFACE;
1437 }
1438
1439 if(IsEqualGUID(&IID_undocumentedIE11, guidService)) {
1440 trace("QueryService(IID_undocumentedIE11)\n");
1441 *ppv = NULL;
1442 return E_NOINTERFACE;
1443 }
1444
1445 ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
1446 return E_NOINTERFACE;
1447}
static const IID IID_undocumentedIE11
Definition: url.c:46
static IHttpSecurity HttpSecurity
Definition: url.c:1385

◆ ServiceProvider_Release()

static ULONG WINAPI ServiceProvider_Release ( IServiceProvider iface)
static

Definition at line 1398 of file url.c.

1399{
1400 return 1;
1401}

◆ set_file_url()

static void set_file_url ( char path)
static

Definition at line 3682 of file url.c.

3683{
3684 CHAR file_urlA[INTERNET_MAX_URL_LENGTH];
3685
3686 lstrcpyA(file_urlA, "file://");
3687 lstrcatA(file_urlA, path);
3689}
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100

Referenced by create_file().

◆ START_TEST()

START_TEST ( url  )

Definition at line 3923 of file url.c.

3924{
3925 HMODULE hurlmon;
3926
3928 {
3929 win_skip("Skipping urlmon:url due to hang ROSTESTS-358\n");
3930 return;
3931 }
3932
3933 hurlmon = GetModuleHandleA("urlmon.dll");
3934 pCreateAsyncBindCtxEx = (void*) GetProcAddress(hurlmon, "CreateAsyncBindCtxEx");
3935
3936 if(!GetProcAddress(hurlmon, "CompareSecurityIds")) {
3937 win_skip("Too old IE\n");
3938 return;
3939 }
3940
3941 pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri");
3942 if(!pCreateUri)
3943 win_skip("IUri not supported\n");
3944
3951
3952 test_create();
3953
3954 trace("test CreateAsyncBindCtx...\n");
3956
3957 trace("test CreateAsyncBindCtxEx...\n");
3959
3960 trace("test RegisterBindStatusCallback...\n");
3962 trace("test BindToStorage failures...\n");
3964
3965 trace("synchronous http test (COM not initialised)...\n");
3966 test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM);
3967
3969
3970 trace("test StdURLMoniker...\n");
3972
3973 trace("synchronous http test...\n");
3974 test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM);
3975
3976 trace("emulated synchronous http test (to file)...\n");
3978
3979 trace("synchronous http test (to object)...\n");
3981
3982 trace("emulated synchronous http test (with cache)...\n");
3984
3985 trace("emulated synchronous http test (with cache, no read)...\n");
3987
3988 trace("synchronous http test (with cache, no read)...\n");
3990
3991 trace("synchronous file test...\n");
3992 test_BindToStorage(FILE_TEST, 0, TYMED_ISTREAM);
3993
3994 trace("emulated synchronous file test (to file)...\n");
3996
3997 trace("synchronous file test (to object)...\n");
3999
4000 trace("bind to an object of not registered MIME type...\n");
4001 create_file("test.winetest", "\x01\x02\x03xxxxxxxxxxxxxxxxxxxxxxxxx");
4004
4005 trace("file test (no callback)...\n");
4007
4008 if(can_do_https()) {
4009 trace("synchronous https test (invalid CN, dialog)\n");
4013
4014 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
4015
4016 trace("asynchronous https test (invalid CN, fail)\n");
4019
4020 trace("asynchronous https test (invalid CN, accept)\n");
4023
4024 trace("asynchronous https test (invalid CN, dialog 2)\n");
4028
4029 trace("asynchronous https test...\n");
4030 test_BindToStorage(HTTPS_TEST, 0, TYMED_ISTREAM);
4031 }else {
4032 win_skip("Skipping https testt\n");
4033 }
4034
4035 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
4036
4037 trace("winetest test (async switch)...\n");
4039
4040 trace("about test (no read)...\n");
4042
4043 trace("http test...\n");
4044 test_BindToStorage(HTTP_TEST, 0, TYMED_ISTREAM);
4045
4046 trace("http test (to file)...\n");
4047 test_BindToStorage(HTTP_TEST, 0, TYMED_FILE);
4048
4049 trace("http test (to object)...\n");
4051
4052 trace("http test (short response)...\n");
4054
4055 trace("http test (short response, to object)...\n");
4057
4058 trace("http test (abort start binding E_NOTIMPL)...\n");
4061
4062 trace("http test (abort start binding E_ABORT)...\n");
4065
4066 trace("http test (abort progress)...\n");
4068
4069 trace("emulated http test...\n");
4071
4072 trace("emulated http test (to object)...\n");
4074
4075 trace("emulated http test (to object, redirect)...\n");
4077
4078 trace("emulated http test (to file)...\n");
4080
4081 trace("emulated http test (redirect)...\n");
4083
4084 trace("emulated http test (with cache)...\n");
4086
4087 trace("winetest test (no callback)...\n");
4089
4090 trace("emulated https test...\n");
4092
4093 trace("about test...\n");
4094 test_BindToStorage(ABOUT_TEST, 0, TYMED_ISTREAM);
4095
4096 trace("about test (to file)...\n");
4097 test_BindToStorage(ABOUT_TEST, 0, TYMED_FILE);
4098
4099 trace("about test (to object)...\n");
4101
4102 trace("emulated about test...\n");
4104
4105 trace("emulated about test (to file)...\n");
4107
4108 trace("emulated about test (to object)...\n");
4110
4111 trace("emulalated test reporting result in read...\n");
4113
4114 trace("file test...\n");
4115 test_BindToStorage(FILE_TEST, 0, TYMED_ISTREAM);
4116
4117 trace("file test (to file)...\n");
4118 test_BindToStorage(FILE_TEST, 0, TYMED_FILE);
4119
4120 trace("file test (to object)...\n");
4122
4123 trace("emulated file test...\n");
4125
4126 trace("emulated file test (to file)...\n");
4128
4129 trace("emulated file test (to object)...\n");
4131
4132 trace("emulated its test...\n");
4134
4135 trace("emulated its test (to file)...\n");
4137
4138 trace("emulated mk test...\n");
4140
4141 trace("test URLDownloadToFile for file protocol...\n");
4143
4144 trace("test URLDownloadToFile for emulated file protocol...\n");
4146
4147 trace("test URLDownloadToFile for http protocol...\n");
4149
4150 trace("test URLDownloadToFile abort...\n");
4152
4153 trace("test emulated http abort...\n");
4155
4156 bindf |= BINDF_NOWRITECACHE;
4157
4158 trace("ftp test...\n");
4159 test_BindToStorage(FTP_TEST, 0, TYMED_ISTREAM);
4160
4161 trace("test failures...\n");
4163
4164 bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE;
4165 only_check_prot_args = TRUE; /* Fail after checking arguments to Protocol_Start */
4166
4167 trace("check emulated http protocol arguments...\n");
4169 }
4170
4176}
#define GetProcAddress(x, y)
Definition: compat.h:753
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static void test_BindToObject(void)
Definition: mimeole.c:1115
static BOOL can_do_https(void)
Definition: url.c:3897
static HRESULT abort_hres
Definition: url.c:182
static void test_URLDownloadToFile_abort(void)
Definition: url.c:3575
static void test_create(void)
Definition: url.c:276
static void test_CreateAsyncBindCtx(void)
Definition: url.c:2433
#define BINDTEST_ALLOW_FINDINGRESOURCE
Definition: url.c:2866
static void test_BindToStorage_fail(void)
Definition: url.c:3791
static void register_protocols(void)
Definition: url.c:3878
static void create_html_file(void)
Definition: url.c:3715
static BOOL test_RegisterBindStatusCallback(void)
Definition: url.c:2752
static BOOL http_is_first
Definition: url.c:173
static void test_StdURLMoniker(void)
Definition: url.c:3820
static BOOL invalid_cn_accepted
Definition: url.c:188
static void test_CreateAsyncBindCtxEx(void)
Definition: url.c:2473
static void test_BindToStorage(int protocol, DWORD flags, DWORD t)
Definition: url.c:2933
static void create_cache_file(void)
Definition: url.c:3720
static void test_URLDownloadToFile(DWORD prot, BOOL emul)
Definition: url.c:3472
#define win_skip
Definition: test.h:163
int winetest_interactive
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
#define REGDB_E_CLASSNOTREG
Definition: winerror.h:2696

◆ statusclb_AddRef()

static ULONG WINAPI statusclb_AddRef ( IBindStatusCallbackEx iface)
static

Definition at line 1576 of file url.c.

1577{
1578 return 2;
1579}

◆ statusclb_GetBindInfo()

static HRESULT WINAPI statusclb_GetBindInfo ( IBindStatusCallbackEx iface,
DWORD grfBINDF,
BINDINFO *  pbindinfo 
)
static

Definition at line 1943 of file url.c.

1944{
1945 DWORD cbSize;
1946
1947 if(iface == &objbsc)
1948 CHECK_EXPECT(Obj_GetBindInfo);
1949 else
1950 CHECK_EXPECT(GetBindInfo);
1951
1952 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1953
1954 *grfBINDF = bindf;
1955 cbSize = pbindinfo->cbSize;
1956 memset(pbindinfo, 0, cbSize);
1957 pbindinfo->cbSize = cbSize;
1958
1959 return S_OK;
1960}
static IBindStatusCallbackEx objbsc
Definition: url.c:1458

◆ statusclb_GetBindInfoEx()

static HRESULT WINAPI statusclb_GetBindInfoEx ( IBindStatusCallbackEx iface,
DWORD grfBINDF,
BINDINFO *  pbindinfo,
DWORD grfBINDF2,
DWORD pdwReserved 
)
static

Definition at line 2122 of file url.c.

2124{
2125 CHECK_EXPECT(GetBindInfoEx);
2126
2127 ok(grfBINDF != NULL, "grfBINDF == NULL\n");
2128 ok(grfBINDF2 != NULL, "grfBINDF2 == NULL\n");
2129 ok(pbindinfo != NULL, "pbindinfo == NULL\n");
2130 ok(pdwReserved != NULL, "dwReserved == NULL\n");
2131
2132 return S_OK;
2133}
_Reserved_ DWORD * pdwReserved
Definition: wincrypt.h:4254

◆ statusclb_GetPriority()

static HRESULT WINAPI statusclb_GetPriority ( IBindStatusCallbackEx iface,
LONG pnPriority 
)
static

Definition at line 1644 of file url.c.

1645{
1646 ok(0, "unexpected call\n");
1647 return E_NOTIMPL;
1648}

◆ statusclb_OnDataAvailable()

static HRESULT WINAPI statusclb_OnDataAvailable ( IBindStatusCallbackEx iface,
DWORD  grfBSCF,
DWORD  dwSize,
FORMATETC *  pformatetc,
STGMEDIUM *  pstgmed 
)
static

Definition at line 1987 of file url.c.

1989{
1990 HRESULT hres;
1991 DWORD readed;
1992 BYTE buf[512];
1993 CHAR clipfmt[512];
1994
1995 if(iface == &objbsc)
1996 ok(0, "unexpected call\n");
1997
1998 CHECK_EXPECT2(OnDataAvailable);
1999
2000 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
2001
2003 "Download state was %d, expected DOWNLOADING or END_DOWNLOAD\n",
2006
2008 ok(grfBSCF == (BSCF_FIRSTDATANOTIFICATION|BSCF_LASTDATANOTIFICATION), "grfBSCF = %x\n", grfBSCF);
2009
2010 ok(pformatetc != NULL, "pformatetx == NULL\n");
2011 if(pformatetc) {
2012 if (mime_type[0]) {
2013 INT ret;
2014 clipfmt[0] = 0;
2015 ret = GetClipboardFormatNameA(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1);
2016 ok(ret, "GetClipboardFormatName failed, error %d\n", GetLastError());
2017 ok(!strcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n",
2018 pformatetc->cfFormat, clipfmt, mime_type);
2019 } else {
2020 ok(pformatetc->cfFormat == 0, "clipformat=%x\n", pformatetc->cfFormat);
2021 }
2022 ok(pformatetc->ptd == NULL, "ptd = %p\n", pformatetc->ptd);
2023 ok(pformatetc->dwAspect == 1, "dwAspect=%u\n", pformatetc->dwAspect);
2024 ok(pformatetc->lindex == -1, "lindex=%d\n", pformatetc->lindex);
2025 ok(pformatetc->tymed == tymed, "tymed=%u, expected %u\n", pformatetc->tymed, tymed);
2026 }
2027
2028 ok(pstgmed != NULL, "stgmeg == NULL\n");
2029 ok(pstgmed->tymed == tymed, "tymed=%u, expected %u\n", pstgmed->tymed, tymed);
2030 ok(pstgmed->pUnkForRelease != NULL, "pUnkForRelease == NULL\n");
2031
2032 switch(pstgmed->tymed) {
2033 case TYMED_ISTREAM: {
2034 IStream *stream = U(*pstgmed).pstm;
2035
2036 ok(stream != NULL, "U(*pstgmed).pstm == NULL\n");
2037
2038 if(grfBSCF & BSCF_FIRSTDATANOTIFICATION) {
2039 STATSTG stat;
2040
2041 hres = IStream_Write(stream, buf, 10, NULL);
2043 "Write failed: %08x, expected STG_E_ACCESSDENIED\n", hres);
2044
2045 hres = IStream_Commit(stream, 0);
2046 ok(hres == E_NOTIMPL, "Commit failed: %08x, expected E_NOTIMPL\n", hres);
2047
2048 hres = IStream_Revert(stream);
2049 ok(hres == E_NOTIMPL, "Revert failed: %08x, expected E_NOTIMPL\n", hres);
2050
2051 hres = IStream_Stat(stream, NULL, STATFLAG_NONAME);
2052 ok(hres == E_FAIL, "hres = %x\n", hres);
2054 hres = IStream_Stat(stream, &stat, STATFLAG_DEFAULT);
2055 ok(hres == S_OK, "hres = %x\n", hres);
2056 ok(!lstrcmpW(stat.pwcsName, cache_file_name),
2057 "stat.pwcsName = %s, cache_file_name = %s\n",
2059 CoTaskMemFree(stat.pwcsName);
2060 ok(U(stat.cbSize).LowPart == (bindf&BINDF_ASYNCHRONOUS?0:6500),
2061 "stat.cbSize.LowPart = %u\n", U(stat.cbSize).LowPart);
2062 } else {
2063 hres = IStream_Stat(stream, &stat, STATFLAG_NONAME);
2064 ok(hres == S_OK, "hres = %x\n", hres);
2065 ok(!stat.pwcsName || broken(stat.pwcsName!=NULL),
2066 "stat.pwcsName = %s\n", wine_dbgstr_w(stat.pwcsName));
2067 }
2068 ok(stat.type == STGTY_STREAM, "stat.type = %x\n", stat.type);
2069 ok(U(stat.cbSize).HighPart == 0, "stat.cbSize.HighPart != 0\n");
2070 ok(stat.grfMode == (U(stat.cbSize).LowPart?GENERIC_READ:0), "stat.grfMode = %x\n", stat.grfMode);
2071 ok(stat.grfLocksSupported == 0, "stat.grfLocksSupported = %x\n", stat.grfLocksSupported);
2072 ok(stat.grfStateBits == 0, "stat.grfStateBits = %x\n", stat.grfStateBits);
2073 ok(stat.reserved == 0, "stat.reserved = %x\n", stat.reserved);
2074 }
2075
2076 if(callback_read) {
2077 do {
2078 hres = IStream_Read(stream, buf, 512, &readed);
2079 if(test_protocol == HTTP_TEST && emulate_protocol && readed)
2080 ok(buf[0] == (use_cache_file && !(bindf&BINDF_ASYNCHRONOUS) ? 'X' : '?'), "buf[0] = '%c'\n", buf[0]);
2081 }while(hres == S_OK);
2082 ok(hres == S_FALSE || hres == E_PENDING, "IStream_Read returned %08x\n", hres);
2083 }
2084
2085 if(use_cache_file && (grfBSCF & BSCF_FIRSTDATANOTIFICATION) && !(bindf & BINDF_PULLDATA))
2087 break;
2088 }
2089 case TYMED_FILE:
2091 ok(!lstrcmpW(pstgmed->u.lpszFileName, file_url+7),
2092 "unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName));
2093 else if(emulate_protocol)
2094 ok(!lstrcmpW(pstgmed->u.lpszFileName, cache_fileW),
2095 "unexpected file name %s\n", wine_dbgstr_w(pstgmed->u.lpszFileName));
2096 else if(test_protocol == HTTP_TEST)
2097 lstrcpyW(http_cache_file, pstgmed->u.lpszFileName);
2098 else
2099 ok(pstgmed->u.lpszFileName != NULL, "lpszFileName == NULL\n");
2100 }
2101
2105
2106 return S_OK;
2107}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define stat
Definition: acwin.h:99
#define U(x)
Definition: wordpad.c:45
#define GENERIC_READ
Definition: compat.h:135
static void test_stream_seek(IStream *stream)
Definition: url.c:1962
static WCHAR http_cache_file[MAX_PATH]
Definition: url.c:186
Definition: stat.h:55
Definition: parse.h:23
int32_t INT
Definition: typedefs.h:58
#define STG_E_ACCESSDENIED
Definition: winerror.h:2568
int WINAPI GetClipboardFormatNameA(_In_ UINT format, _Out_writes_(cchMaxCount) LPSTR lpszFormatName, _In_ int cchMaxCount)

◆ statusclb_OnLowResource()

static HRESULT WINAPI statusclb_OnLowResource ( IBindStatusCallbackEx iface,
DWORD  reserved 
)
static

Definition at line 1650 of file url.c.

1651{
1652 ok(0, "unexpected call\n");
1653 return E_NOTIMPL;
1654}

◆ statusclb_OnObjectAvailable()

static HRESULT WINAPI statusclb_OnObjectAvailable ( IBindStatusCallbackEx iface,
REFIID  riid,
IUnknown punk 
)
static

Definition at line 2109 of file url.c.

2110{
2111 CHECK_EXPECT(OnObjectAvailable);
2112
2113 if(iface != &objbsc)
2114 ok(0, "unexpected call\n");
2115
2116 ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", wine_dbgstr_guid(riid));
2117 ok(punk != NULL, "punk == NULL\n");
2118
2119 return S_OK;
2120}

◆ statusclb_OnProgress()

static HRESULT WINAPI statusclb_OnProgress ( IBindStatusCallbackEx iface,
ULONG  ulProgress,
ULONG  ulProgressMax,
ULONG  ulStatusCode,
LPCWSTR  szStatusText 
)
static

Definition at line 1656 of file url.c.

1658{
1659 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1660
1661 switch(ulStatusCode) {
1662 case BINDSTATUS_FINDINGRESOURCE:
1663 if(iface == &objbsc)
1664 CHECK_EXPECT(Obj_OnProgress_FINDINGRESOURCE);
1665 else if(test_protocol == FTP_TEST)
1666 todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
1668 todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
1669 else
1670 CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
1673 break;
1674 case BINDSTATUS_CONNECTING:
1675 if(iface == &objbsc)
1676 CHECK_EXPECT(Obj_OnProgress_CONNECTING);
1677 else if(test_protocol == FTP_TEST)
1678 todo_wine CHECK_EXPECT(OnProgress_CONNECTING);
1679 else if(onsecurityproblem_hres == S_OK)
1680 CHECK_EXPECT2(OnProgress_CONNECTING);
1681 else
1682 CHECK_EXPECT(OnProgress_CONNECTING);
1685 break;
1686 case BINDSTATUS_REDIRECTING:
1687 if(iface == &objbsc)
1688 CHECK_EXPECT(Obj_OnProgress_REDIRECTING);
1689 else
1690 CHECK_EXPECT(OnProgress_REDIRECTING);
1691 ok(!lstrcmpW(szStatusText, winetest_data_urlW), "unexpected status text %s\n",
1692 wine_dbgstr_w(szStatusText));
1694 && (!bind_to_object || iface == &objbsc))
1696 break;
1697 case BINDSTATUS_SENDINGREQUEST:
1698 if(iface == &objbsc)
1699 CHECK_EXPECT(Obj_OnProgress_SENDINGREQUEST);
1700 else if(test_protocol == FTP_TEST)
1701 CHECK_EXPECT2(OnProgress_SENDINGREQUEST);
1702 else
1703 CHECK_EXPECT(OnProgress_SENDINGREQUEST);
1706
1707 if(abort_progress) {
1708 if(filedwl_api)
1710 return E_ABORT;
1711 }
1712
1713 break;
1714 case BINDSTATUS_MIMETYPEAVAILABLE:
1715 if(iface == &objbsc)
1716 CHECK_EXPECT(Obj_OnProgress_MIMETYPEAVAILABLE);
1717 else
1718 CHECK_EXPECT(OnProgress_MIMETYPEAVAILABLE);
1719 if(!bind_to_object)
1720 ok(download_state == BEFORE_DOWNLOAD, "Download state was %d, expected BEFORE_DOWNLOAD\n",
1722 WideCharToMultiByte(CP_ACP, 0, szStatusText, -1, mime_type, sizeof(mime_type)-1, NULL, NULL);
1723 break;
1724 case BINDSTATUS_BEGINDOWNLOADDATA:
1725 if(iface == &objbsc)
1726 CHECK_EXPECT(Obj_OnProgress_BEGINDOWNLOADDATA);
1727 else
1728 CHECK_EXPECT(OnProgress_BEGINDOWNLOADDATA);
1729 ok(szStatusText != NULL, "szStatusText == NULL\n");
1730 if(szStatusText) {
1731 if(filedwl_api) {
1732 /* FIXME */
1733 }else {
1734 ok(!lstrcmpW(szStatusText, current_url), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText));
1735 }
1736 }
1737 if(!bind_to_object)
1738 ok(download_state == BEFORE_DOWNLOAD, "Download state was %d, expected BEFORE_DOWNLOAD\n",
1741 break;
1742 case BINDSTATUS_DOWNLOADINGDATA:
1743 CHECK_EXPECT2(OnProgress_DOWNLOADINGDATA);
1744 ok(iface != &objbsc, "unexpected call\n");
1745 ok(download_state == DOWNLOADING, "Download state was %d, expected DOWNLOADING\n",
1747 if(test_abort) {
1748 HRESULT hres;
1749
1750 SET_EXPECT(Abort);
1751 hres = IBinding_Abort(current_binding);
1752 ok(hres == S_OK, "Abort failed: %08x\n", hres);
1753 CHECK_CALLED(Abort);
1754
1755 hres = IBinding_Abort(current_binding);
1756 ok(hres == E_FAIL, "Abort failed: %08x\n", hres);
1757
1759 }
1760 break;
1761 case BINDSTATUS_ENDDOWNLOADDATA:
1762 if(iface == &objbsc)
1763 CHECK_EXPECT(Obj_OnProgress_ENDDOWNLOADDATA);
1764 else
1765 CHECK_EXPECT(OnProgress_ENDDOWNLOADDATA);
1766 ok(szStatusText != NULL, "szStatusText == NULL\n");
1767 if(szStatusText) {
1768 if(filedwl_api) {
1769 /* FIXME */
1770 }else {
1771 ok(!lstrcmpW(szStatusText, current_url), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText));
1772 }
1773 }
1774 ok(download_state == DOWNLOADING, "Download state was %d, expected DOWNLOADING\n",
1777 break;
1778 case BINDSTATUS_CACHEFILENAMEAVAILABLE:
1780 if(iface == &objbsc)
1781 CHECK_EXPECT(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
1782 else
1783 CHECK_EXPECT(OnProgress_CACHEFILENAMEAVAILABLE);
1784 }else { /* FIXME */
1785 CLEAR_CALLED(OnProgress_CACHEFILENAMEAVAILABLE);
1786 CLEAR_CALLED(Obj_OnProgress_CACHEFILENAMEAVAILABLE);
1787 }
1788
1789 ok(szStatusText != NULL, "szStatusText == NULL\n");
1790 if(szStatusText && test_protocol == FILE_TEST)
1791 ok(!lstrcmpW(file_url+7, szStatusText), "wrong szStatusText %s\n", wine_dbgstr_w(szStatusText));
1792 break;
1793 case BINDSTATUS_CLASSIDAVAILABLE:
1794 {
1795 CLSID clsid;
1796 HRESULT hr;
1797 if(iface != &objbsc)
1798 ok(0, "unexpected call\n");
1799 else
1800 CHECK_EXPECT(Obj_OnProgress_CLASSIDAVAILABLE);
1801 hr = CLSIDFromString((LPCOLESTR)szStatusText, &clsid);
1802 ok(hr == S_OK, "CLSIDFromString failed with error 0x%08x\n", hr);
1803 ok(IsEqualCLSID(&clsid, &CLSID_HTMLDocument),
1804 "Expected clsid to be CLSID_HTMLDocument instead of %s\n", wine_dbgstr_guid(&clsid));
1805 break;
1806 }
1807 case BINDSTATUS_BEGINSYNCOPERATION:
1808 CHECK_EXPECT(Obj_OnProgress_BEGINSYNCOPERATION);
1809 if(iface != &objbsc)
1810 ok(0, "unexpected call\n");
1811 ok(szStatusText == NULL, "Expected szStatusText to be NULL\n");
1812 break;
1813 case BINDSTATUS_ENDSYNCOPERATION:
1814 CHECK_EXPECT(Obj_OnProgress_ENDSYNCOPERATION);
1815 if(iface != &objbsc)
1816 ok(0, "unexpected call\n");
1817 ok(szStatusText == NULL, "Expected szStatusText to be NULL\n");
1818 break;
1819 case BINDSTATUS_PROXYDETECTING:
1820 trace("BINDSTATUS_PROXYDETECTING\n");
1821 break;
1822 case BINDSTATUS_COOKIE_SENT:
1823 trace("BINDSTATUS_COOKIE_SENT\n");
1824 break;
1825 case BINDSTATUS_DECODING:
1826 trace("BINDSTATUS_DECODING\n");
1827 break;
1828 default:
1829 ok(0, "unexpected code %d\n", ulStatusCode);
1830 };
1831
1832 if(current_binding) {
1833 IWinInetHttpInfo *http_info;
1834 HRESULT hres;
1835
1836 hres = IBinding_QueryInterface(current_binding, &IID_IWinInetHttpInfo, (void**)&http_info);
1838 ok(hres == S_OK, "Could not get IWinInetHttpInfo iface: %08x\n", hres);
1839 test_WinInetHttpInfo(http_info, ulStatusCode);
1840 } else
1842 "QueryInterface(IID_IWinInetHttpInfo) returned: %08x, expected E_NOINTERFACE\n", hres);
1843 if(SUCCEEDED(hres))
1844 IWinInetHttpInfo_Release(http_info);
1845 }
1846
1847 return S_OK;
1848}
#define WideCharToMultiByte
Definition: compat.h:111
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2338
#define todo_wine
Definition: custom.c:79
static IBinding * current_binding
Definition: url.c:178
static void test_WinInetHttpInfo(IWinInetHttpInfo *http_info, DWORD progress)
Definition: url.c:1460
REFCLSID clsid
Definition: msctf.c:82
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
HRESULT hr
Definition: shlfolder.c:183

◆ statusclb_OnStartBinding()

static HRESULT WINAPI statusclb_OnStartBinding ( IBindStatusCallbackEx iface,
DWORD  dwReserved,
IBinding pib 
)
static

Definition at line 1586 of file url.c.

1588{
1589 IWinInetHttpInfo *http_info;
1590 HRESULT hres;
1591 IMoniker *mon;
1592 DWORD res;
1593 CLSID clsid;
1594 LPOLESTR res_str;
1595
1596 if(iface == &objbsc)
1597 CHECK_EXPECT(Obj_OnStartBinding);
1598 else
1599 CHECK_EXPECT(OnStartBinding);
1600
1601 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1602
1603 ok(pib != NULL, "pib should not be NULL\n");
1604 ok(dwReserved == 0xff, "dwReserved=%x\n", dwReserved);
1605
1606 if(pib == (void*)0xdeadbeef)
1607 return S_OK;
1608
1609 current_binding = pib;
1610
1611 hres = IBinding_QueryInterface(pib, &IID_IMoniker, (void**)&mon);
1612 ok(hres == E_NOINTERFACE, "IBinding should not have IMoniker interface\n");
1613 if(SUCCEEDED(hres))
1614 IMoniker_Release(mon);
1615
1616 hres = IBinding_QueryInterface(pib, &IID_IWinInetHttpInfo, (void**)&http_info);
1617 ok(hres == E_NOINTERFACE, "Could not get IID_IWinInetHttpInfo: %08x\n", hres);
1618
1619 if(0) { /* crashes with native urlmon */
1620 hres = IBinding_GetBindResult(pib, NULL, &res, &res_str, NULL);
1621 ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres);
1622 }
1623 hres = IBinding_GetBindResult(pib, &clsid, NULL, &res_str, NULL);
1624 ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres);
1625 hres = IBinding_GetBindResult(pib, &clsid, &res, NULL, NULL);
1626 ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres);
1627 hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, (void*)0xdeadbeef);
1628 ok(hres == E_INVALIDARG, "GetBindResult failed: %08x\n", hres);
1629
1630 hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, NULL);
1631 ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres);
1632 ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", wine_dbgstr_guid(&clsid));
1633 ok(!res, "incorrect res: %x\n", res);
1634 ok(!res_str, "incorrect res_str: %s\n", wine_dbgstr_w(res_str));
1635
1636 if(abort_start) {
1638 return abort_hres;
1639 }
1640
1641 return S_OK;
1642}
GLuint res
Definition: glext.h:9613
static LPOLESTR
Definition: stg_prop.c:27
#define CLSID_NULL
Definition: guiddef.h:99

◆ statusclb_OnStopBinding()

static HRESULT WINAPI statusclb_OnStopBinding ( IBindStatusCallbackEx iface,
HRESULT  hresult,
LPCWSTR  szError 
)
static

Definition at line 1850 of file url.c.

1851{
1852 if(iface == &objbsc) {
1853 CHECK_EXPECT(Obj_OnStopBinding);
1855 }else {
1856 CHECK_EXPECT(OnStopBinding);
1858 }
1859
1860 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1861
1863 todo_wine ok(hresult == S_OK, "Got %08x\n", hresult);
1864 return S_OK;
1865 }
1866
1867 /* ignore DNS failure */
1869 return S_OK;
1870
1871 if(filedwl_api) {
1873 ok(SUCCEEDED(hresult), "binding failed: %08x\n", hresult);
1874 else if(abort_start && abort_hres == E_NOTIMPL)
1875 todo_wine ok(hresult == S_FALSE, "binding failed: %08x, expected S_FALSE\n", hresult);
1876 else
1877 ok(hresult == E_ABORT, "binding failed: %08x, expected E_ABORT\n", hresult);
1878 } else
1879 ok(hresult == binding_hres, "binding failed: %08x, expected %08x\n", hresult, binding_hres);
1880 ok(szError == NULL, "szError should be NULL\n");
1881
1882 if(current_binding) {
1883 CLSID clsid;
1884 DWORD res;
1885 LPOLESTR res_str;
1886 HRESULT hres;
1887
1888 hres = IBinding_GetBindResult(current_binding, &clsid, &res, &res_str, NULL);
1889 ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres);
1890 ok(res == hresult, "res = %08x, expected %08x\n", res, binding_hres);
1891 ok(!res_str, "incorrect res_str = %s\n", wine_dbgstr_w(res_str));
1892
1893 if(hresult==S_OK || (abort_start && hresult!=S_FALSE) || hresult == REGDB_E_CLASSNOTREG) {
1895 "incorrect protocol CLSID: %s, expected CLSID_NULL\n",
1897 }else if(emulate_protocol) {
1898 todo_wine ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol),
1899 "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
1901 }else if(test_protocol == FTP_TEST) {
1902 ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol),
1903 "incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
1905 }else if(test_protocol == FILE_TEST) {
1906 ok(IsEqualCLSID(&clsid, &CLSID_FileProtocol),
1907 "incorrect protocol CLSID: %s, expected CLSID_FileProtocol\n",
1909 }else if(test_protocol == HTTP_TEST) {
1910 ok(IsEqualCLSID(&clsid, &CLSID_HttpProtocol),
1911 "incorrect protocol CLSID: %s, expected CLSID_HttpProtocol\n",
1913 }else if(test_protocol == HTTPS_TEST) {
1914 ok(IsEqualCLSID(&clsid, &CLSID_HttpSProtocol),
1915 "incorrect protocol CLSID: %s, expected CLSID_HttpSProtocol\n",
1917 }else if(test_protocol == ABOUT_TEST) {
1919 "incorrect protocol CLSID: %s, expected CLSID_AboutProtocol\n",
1921 }else {
1922 ok(0, "unexpected (%d)\n", test_protocol);
1923 }
1924 }
1925
1928 if(iface != &objbsc)
1929 ok( WaitForSingleObject(complete_event2, 90000) == WAIT_OBJECT_0, "wait timed out\n" );
1930 }
1931
1935 ok(file == INVALID_HANDLE_VALUE, "expected INVALID_HANDLE_VALUE, got %p\n", file);
1936 ok(GetLastError() == ERROR_SHARING_VIOLATION, "expected ERROR_SHARING_VIOLATION, got %u\n", GetLastError());
1937 http_cache_file[0] = 0;
1938 }
1939
1940 return S_OK;
1941}
#define OPEN_EXISTING
Definition: compat.h:775
#define CreateFileW
Definition: compat.h:741
#define FILE_SHARE_READ
Definition: compat.h:136
CLSID CLSID_AboutProtocol
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_SHARE_DELETE
Definition: nt_native.h:682
#define DELETE
Definition: nt_native.h:57
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define WAIT_OBJECT_0
Definition: winbase.h:406
#define ERROR_SHARING_VIOLATION
Definition: winerror.h:135
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_INTERNET_NAME_NOT_RESOLVED
Definition: wininet.h:1996

◆ statusclb_QueryInterface()

static HRESULT WINAPI statusclb_QueryInterface ( IBindStatusCallbackEx iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1506 of file url.c.

1507{
1508 static const IID IID_undocumentedIE10 = {0xf286fa56,0xc1fd,0x4270,{0x8e,0x67,0xb3,0xeb,0x79,0x0a,0x81,0xe8}};
1509
1510 ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
1511
1512 if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
1513 CHECK_EXPECT2(QueryInterface_IInternetProtocol);
1514 if(emulate_protocol) {
1515 *ppv = &Protocol;
1516 return S_OK;
1517 }else {
1518 return E_NOINTERFACE;
1519 }
1520 }else if (IsEqualGUID(&IID_IServiceProvider, riid)) {
1521 CHECK_EXPECT2(QueryInterface_IServiceProvider);
1522 *ppv = &ServiceProvider;
1523 return S_OK;
1524 }else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) {
1525 CHECK_EXPECT2(QueryInterface_IHttpNegotiate);
1526 *ppv = &HttpNegotiate;
1527 return S_OK;
1528 }else if (IsEqualGUID(&IID_IHttpNegotiate2, riid)) {
1529 CHECK_EXPECT(QueryInterface_IHttpNegotiate2);
1530 *ppv = &HttpNegotiate;
1531 return S_OK;
1532 }else if (IsEqualGUID(&IID_IAuthenticate, riid)) {
1533 CHECK_EXPECT(QueryInterface_IAuthenticate);
1534 return E_NOINTERFACE;
1535 }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) {
1536 if(strict_bsc_qi)
1537 CHECK_EXPECT2(QueryInterface_IBindStatusCallback);
1538 *ppv = iface;
1539 return S_OK;
1541 CHECK_EXPECT2(QueryInterface_IBindStatusCallbackHolder);
1542 return E_NOINTERFACE;
1543 }else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) {
1544 CHECK_EXPECT(QueryInterface_IBindStatusCallbackEx);
1545 if(!use_bscex)
1546 return E_NOINTERFACE;
1547 *ppv = iface;
1548 return S_OK;
1549 }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) {
1550 /* TODO */
1551 }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
1552