ReactOS  0.4.15-dev-489-g75a0787
uri.c File Reference
#include <wine/test.h>
#include <stdarg.h>
#include <stddef.h>
#include "windef.h"
#include "winbase.h"
#include "urlmon.h"
#include "shlwapi.h"
#include "wininet.h"
#include "strsafe.h"
#include "initguid.h"
#include <wine/heap.h>
Include dependency graph for uri.c:

Go to the source code of this file.

Classes

struct  _uri_create_flag_test
 
struct  _uri_str_property
 
struct  _uri_dword_property
 
struct  _uri_properties
 
struct  _invalid_uri
 
struct  _uri_equality
 
struct  _uri_with_fragment
 
struct  _uri_builder_property
 
struct  _uri_builder_port
 
struct  _uri_builder_str_property
 
struct  _uri_builder_dword_property
 
struct  _uri_builder_test
 
struct  _uri_builder_remove_test
 
struct  _uri_combine_str_property
 
struct  _uri_combine_test
 
struct  _uri_parse_test
 
struct  custom_uri
 
struct  create_urlmon_test_t
 

Macros

#define COBJMACROS
 
#define CONST_VTABLE
 
#define WIN32_LEAN_AND_MEAN
 
#define URI_STR_PROPERTY_COUNT   Uri_PROPERTY_STRING_LAST+1
 
#define URI_DWORD_PROPERTY_COUNT   (Uri_PROPERTY_DWORD_LAST - Uri_PROPERTY_DWORD_START)+1
 
#define URI_BUILDER_STR_PROPERTY_COUNT   7
 
#define DEFINE_EXPECT(func)   static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
 
#define SET_EXPECT(func)   expect_ ## func = TRUE
 
#define CHECK_EXPECT(func)
 
#define CHECK_EXPECT2(func)
 
#define CHECK_CALLED(func)
 
#define test_urlmon_display_name(a, b)   _test_urlmon_display_name(__LINE__,a,b)
 
#define test_display_uri(a, b)   _test_display_uri(__LINE__,a,b)
 

Typedefs

typedef struct _uri_create_flag_test uri_create_flag_test
 
typedef struct _uri_str_property uri_str_property
 
typedef struct _uri_dword_property uri_dword_property
 
typedef struct _uri_properties uri_properties
 
typedef struct _invalid_uri invalid_uri
 
typedef struct _uri_equality uri_equality
 
typedef struct _uri_with_fragment uri_with_fragment
 
typedef struct _uri_builder_property uri_builder_property
 
typedef struct _uri_builder_port uri_builder_port
 
typedef struct _uri_builder_str_property uri_builder_str_property
 
typedef struct _uri_builder_dword_property uri_builder_dword_property
 
typedef struct _uri_builder_test uri_builder_test
 
typedef struct _uri_builder_remove_test uri_builder_remove_test
 
typedef struct _uri_combine_str_property uri_combine_str_property
 
typedef struct _uri_combine_test uri_combine_test
 
typedef struct _uri_parse_test uri_parse_test
 

Functions

 DEFINE_GUID (CLSID_CUri, 0xDF2FCE13, 0x25EC, 0x45BB, 0x9D, 0x4C, 0xCE, 0xCD, 0x47, 0xC2, 0x43, 0x0C)
 
 DEFINE_EXPECT (CombineUrl)
 
 DEFINE_EXPECT (ParseUrl)
 
static HRESULT (WINAPI *pCreateUri)(LPCWSTR
 
static LPWSTR a2w (LPCSTR str)
 
static DWORD strcmp_aw (LPCSTR strA, LPCWSTR strB)
 
static ULONG get_refcnt (IUri *uri)
 
static void change_property (IUriBuilder *builder, const uri_builder_property *prop, DWORD test_index)
 
static void test_CreateUri_InvalidFlags (void)
 
static void test_CreateUri_InvalidArgs (void)
 
static void test_CreateUri_InvalidUri (void)
 
static void test_IUri_GetPropertyBSTR (void)
 
static void test_IUri_GetPropertyDWORD (void)
 
static void test_IUri_GetStrProperties (void)
 
static void test_IUri_GetDwordProperties (void)
 
static void test_IUri_GetPropertyLength (void)
 
static DWORD compute_expected_props (uri_properties *test, DWORD *mask)
 
static void test_IUri_GetProperties (void)
 
static void test_IUri_HasProperty (void)
 
static struct custom_uriimpl_from_IUri (IUri *iface)
 
static HRESULT WINAPI custom_uri_QueryInterface (IUri *iface, REFIID iid, void **out)
 
static ULONG WINAPI custom_uri_AddRef (IUri *iface)
 
static ULONG WINAPI custom_uri_Release (IUri *iface)
 
static HRESULT WINAPI custom_uri_GetPropertyBSTR (IUri *iface, Uri_PROPERTY property, BSTR *value, DWORD flags)
 
static HRESULT WINAPI custom_uri_GetPropertyLength (IUri *iface, Uri_PROPERTY property, DWORD *length, DWORD flags)
 
static HRESULT WINAPI custom_uri_GetPropertyDWORD (IUri *iface, Uri_PROPERTY property, DWORD *value, DWORD flags)
 
static HRESULT WINAPI custom_uri_HasProperty (IUri *iface, Uri_PROPERTY property, BOOL *has_property)
 
static HRESULT WINAPI custom_uri_GetAbsoluteUri (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetAuthority (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetDisplayUri (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetDomain (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetExtension (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetFragment (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetHost (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetPassword (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetPath (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetPathAndQuery (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetQuery (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetRawUri (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetSchemeName (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetUserInfo (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetUserName (IUri *iface, BSTR *value)
 
static HRESULT WINAPI custom_uri_GetHostType (IUri *iface, DWORD *value)
 
static HRESULT WINAPI custom_uri_GetPort (IUri *iface, DWORD *value)
 
static HRESULT WINAPI custom_uri_GetScheme (IUri *iface, DWORD *value)
 
static HRESULT WINAPI custom_uri_GetZone (IUri *iface, DWORD *value)
 
static HRESULT WINAPI custom_uri_GetProperties (IUri *iface, DWORD *flags)
 
static HRESULT WINAPI custom_uri_IsEqual (IUri *iface, IUri *pUri, BOOL *is_equal)
 
static void test_IUri_IsEqual (void)
 
static void test_CreateUriWithFragment_InvalidArgs (void)
 
static void test_CreateUriWithFragment_InvalidFlags (void)
 
static void test_CreateUriWithFragment (void)
 
static void test_CreateIUriBuilder (void)
 
static void test_IUriBuilder_CreateUri (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_CreateUriSimple (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_CreateUriWithFlags (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_CreateInvalidArgs (void)
 
static void test_IUriBuilder_GetInvalidArgs (void)
 
static void test_IUriBuilder_GetFragment (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetHost (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetPassword (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetPath (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetPort (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetQuery (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetSchemeName (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder_GetUserName (IUriBuilder *builder, const uri_builder_test *test, DWORD test_index)
 
static void test_IUriBuilder (void)
 
static void test_IUriBuilder_HasBeenModified (void)
 
static void test_IUriBuilder_IUriProperty (void)
 
static void test_IUriBuilder_RemoveProperties (void)
 
static void test_IUriBuilder_Misc (void)
 
static void test_IUriBuilderFactory (void)
 
static void test_CoInternetCombineIUri (void)
 
static HRESULT WINAPI InternetProtocolInfo_QueryInterface (IInternetProtocolInfo *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI InternetProtocolInfo_AddRef (IInternetProtocolInfo *iface)
 
static ULONG WINAPI InternetProtocolInfo_Release (IInternetProtocolInfo *iface)
 
static HRESULT WINAPI InternetProtocolInfo_ParseUrl (IInternetProtocolInfo *iface, LPCWSTR pwzUrl, PARSEACTION ParseAction, DWORD dwParseFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
 
static HRESULT WINAPI InternetProtocolInfo_CombineUrl (IInternetProtocolInfo *iface, LPCWSTR pwzBaseUrl, LPCWSTR pwzRelativeUrl, DWORD dwCombineFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD dwReserved)
 
static HRESULT WINAPI InternetProtocolInfo_CompareUrl (IInternetProtocolInfo *iface, LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCompareFlags)
 
static HRESULT WINAPI InternetProtocolInfo_QueryInfo (IInternetProtocolInfo *iface, LPCWSTR pwzUrl, QUERYOPTION OueryOption, DWORD dwQueryFlags, LPVOID pBuffer, DWORD cbBuffer, DWORD *pcbBuf, DWORD dwReserved)
 
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 *pOuter, REFIID riid, void **ppv)
 
static HRESULT WINAPI ClassFactory_LockServer (IClassFactory *iface, BOOL dolock)
 
static void register_protocols (void)
 
static void unregister_protocols (void)
 
static void test_CoInternetCombineIUri_Pluggable (void)
 
static void test_CoInternetCombineUrlEx (void)
 
static void test_CoInternetCombineUrlEx_Pluggable (void)
 
static void test_CoInternetParseIUri_InvalidArgs (void)
 
static void test_CoInternetParseIUri (void)
 
static void test_CoInternetParseIUri_Pluggable (void)
 
static void _test_urlmon_display_name (unsigned line, IMoniker *mon, const char *exurl)
 
static void _test_display_uri (unsigned line, IMoniker *mon, const char *exurl)
 
static void test_CreateURLMoniker (void)
 
static int add_default_flags (DWORD flags)
 
static void test_IPersistStream (void)
 
static void test_UninitializedUri (void)
 
 START_TEST (uri)
 

Variables

static DWORD
 
static DWORD_PTR
 
static IUri **static LPCWSTR
 
static PARSEACTION
 
static LPWSTR
 
static const WCHAR http_urlW []
 
static const WCHAR http_url_fragW []
 
static const WCHAR combine_baseW []
 
static const WCHAR combine_relativeW [] = {'?','t','e','s','t',0}
 
static const WCHAR combine_resultW [] = {'z','i','p',':','t','e','s','t',0}
 
static const WCHAR winetestW [] = {'w','i','n','e','t','e','s','t',0}
 
static const WCHAR parse_urlW [] = {'w','i','n','e','t','e','s','t',':','t','e','s','t',0}
 
static const WCHAR parse_resultW [] = {'z','i','p',':','t','e','s','t',0}
 
static PARSEACTION parse_action
 
static DWORD parse_flags
 
static const uri_create_flag_test invalid_flag_tests []
 
static const uri_properties uri_tests []
 
static const invalid_uri invalid_uri_tests []
 
static const uri_equality equality_tests []
 
static const uri_with_fragment uri_fragment_tests []
 
static const uri_builder_test uri_builder_tests []
 
static const uri_builder_remove_test uri_builder_remove_tests []
 
static const uri_combine_test uri_combine_tests []
 
static const uri_parse_test uri_parse_tests []
 
static const IUriVtbl custom_uri_vtbl
 
static const IInternetProtocolInfoVtbl InternetProtocolInfoVtbl
 
static IInternetProtocolInfo protocol_info = { &InternetProtocolInfoVtbl }
 
static const IClassFactoryVtbl ClassFactoryVtbl
 
static IClassFactory protocol_cf = { &ClassFactoryVtbl }
 
static const create_urlmon_test_t create_urlmon_tests []
 

Macro Definition Documentation

◆ CHECK_CALLED

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

Definition at line 63 of file uri.c.

◆ CHECK_EXPECT

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

Definition at line 50 of file uri.c.

◆ CHECK_EXPECT2

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

Definition at line 57 of file uri.c.

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file uri.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 26 of file uri.c.

◆ DEFINE_EXPECT

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

Definition at line 44 of file uri.c.

◆ SET_EXPECT

#define SET_EXPECT (   func)    expect_ ## func = TRUE

Definition at line 47 of file uri.c.

◆ test_display_uri

#define test_display_uri (   a,
  b 
)    _test_display_uri(__LINE__,a,b)

Definition at line 11212 of file uri.c.

◆ test_urlmon_display_name

#define test_urlmon_display_name (   a,
  b 
)    _test_urlmon_display_name(__LINE__,a,b)

Definition at line 11198 of file uri.c.

◆ URI_BUILDER_STR_PROPERTY_COUNT

#define URI_BUILDER_STR_PROPERTY_COUNT   7

Definition at line 42 of file uri.c.

◆ URI_DWORD_PROPERTY_COUNT

#define URI_DWORD_PROPERTY_COUNT   (Uri_PROPERTY_DWORD_LAST - Uri_PROPERTY_DWORD_START)+1

Definition at line 41 of file uri.c.

◆ URI_STR_PROPERTY_COUNT

#define URI_STR_PROPERTY_COUNT   Uri_PROPERTY_STRING_LAST+1

Definition at line 40 of file uri.c.

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 27 of file uri.c.

Typedef Documentation

◆ invalid_uri

◆ uri_builder_dword_property

◆ uri_builder_port

◆ uri_builder_property

◆ uri_builder_remove_test

◆ uri_builder_str_property

◆ uri_builder_test

◆ uri_combine_str_property

◆ uri_combine_test

◆ uri_create_flag_test

◆ uri_dword_property

◆ uri_equality

◆ uri_parse_test

◆ uri_properties

◆ uri_str_property

◆ uri_with_fragment

Function Documentation

◆ _test_display_uri()

static void _test_display_uri ( unsigned  line,
IMoniker mon,
const char exurl 
)
static

Definition at line 11213 of file uri.c.

11214 {
11215  IUriContainer *uri_container;
11216  IUri *uri;
11217  BSTR display_uri;
11218  HRESULT hres;
11219 
11220  hres = IMoniker_QueryInterface(mon, &IID_IUriContainer, (void**)&uri_container);
11221  ok(hres == S_OK, "Could not get IUriContainer iface: %08x\n", hres);
11222 
11223  uri = NULL;
11224  hres = IUriContainer_GetIUri(uri_container, &uri);
11225  IUriContainer_Release(uri_container);
11226  ok(hres == S_OK, "GetIUri failed: %08x\n", hres);
11227  ok(uri != NULL, "uri == NULL\n");
11228 
11229  hres = IUri_GetDisplayUri(uri, &display_uri);
11230  IUri_Release(uri);
11231  ok(hres == S_OK, "GetDisplayUri failed: %08x\n", hres);
11232  ok_(__FILE__,line)(!strcmp_aw(exurl, display_uri), "unexpected display uri: %s, expected %s\n",
11233  wine_dbgstr_w(display_uri), exurl);
11234  SysFreeString(display_uri);
11235 }
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
OLECHAR * BSTR
Definition: compat.h:1943
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define ok_(x1, x2)
Definition: atltest.h:61
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

◆ _test_urlmon_display_name()

static void _test_urlmon_display_name ( unsigned  line,
IMoniker mon,
const char exurl 
)
static

Definition at line 11199 of file uri.c.

11200 {
11201  WCHAR *display_name;
11202  HRESULT hres;
11203 
11204  hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name);
11205  ok_(__FILE__,line)(hres == S_OK, "GetDisplayName failed: %08x\n", hres);
11206  ok_(__FILE__,line)(!strcmp_aw(exurl, display_name), "unexpected display name: %s, expected %s\n",
11207  wine_dbgstr_w(display_name), exurl);
11208 
11209  CoTaskMemFree(display_name);
11210 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
smooth NULL
Definition: ftsmooth.c:416
Definition: parser.c:48
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
#define S_OK
Definition: intsafe.h:59
#define ok_(x1, x2)
Definition: atltest.h:61
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

◆ a2w()

static LPWSTR a2w ( LPCSTR  str)
inlinestatic

Definition at line 7688 of file uri.c.

7688  {
7689  LPWSTR ret = NULL;
7690 
7691  if(str) {
7692  DWORD len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
7693  ret = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
7694  MultiByteToWideChar(CP_UTF8, 0, str, -1, ret, len);
7695  }
7696 
7697  return ret;
7698 }
#define CP_UTF8
Definition: nls.h:20
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:404
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
GLenum GLsizei len
Definition: glext.h:6722
#define MultiByteToWideChar
Definition: compat.h:100
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by change_property(), strcmp_aw(), test_CoInternetCombineIUri(), test_CoInternetCombineUrlEx(), test_CoInternetParseIUri(), test_CreateUri_InvalidUri(), test_CreateUriWithFragment(), test_CreateURLMoniker(), test_IPersistStream(), test_IUri_GetDwordProperties(), test_IUri_GetProperties(), test_IUri_GetPropertyBSTR(), test_IUri_GetPropertyDWORD(), test_IUri_GetPropertyLength(), test_IUri_GetStrProperties(), test_IUri_HasProperty(), test_IUri_IsEqual(), test_IUriBuilder(), and test_IUriBuilder_RemoveProperties().

◆ add_default_flags()

static int add_default_flags ( DWORD  flags)
static

Definition at line 11315 of file uri.c.

11315  {
11316  if(!(flags & Uri_CREATE_NO_CANONICALIZE))
11317  flags |= Uri_CREATE_CANONICALIZE;
11318  if(!(flags & Uri_CREATE_NO_DECODE_EXTRA_INFO))
11319  flags |= Uri_CREATE_DECODE_EXTRA_INFO;
11320  if(!(flags & Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES))
11321  flags |= Uri_CREATE_CRACK_UNKNOWN_SCHEMES;
11322  if(!(flags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI))
11323  flags |= Uri_CREATE_PRE_PROCESS_HTML_URI;
11324  if(!(flags & Uri_CREATE_IE_SETTINGS))
11325  flags |= Uri_CREATE_NO_IE_SETTINGS;
11326 
11327  return flags;
11328 }
GLbitfield flags
Definition: glext.h:7161

Referenced by test_IPersistStream().

◆ change_property()

static void change_property ( IUriBuilder builder,
const uri_builder_property prop,
DWORD  test_index 
)
static

Definition at line 7712 of file uri.c.

7713  {
7714  HRESULT hr;
7715  LPWSTR valueW;
7716 
7717  valueW = a2w(prop->value);
7718  switch(prop->property) {
7719  case Uri_PROPERTY_FRAGMENT:
7720  hr = IUriBuilder_SetFragment(builder, valueW);
7721  todo_wine_if(prop->todo) {
7722  ok(hr == prop->expected,
7723  "Error: IUriBuilder_SetFragment returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7724  hr, prop->expected, test_index);
7725  }
7726  break;
7727  case Uri_PROPERTY_HOST:
7728  hr = IUriBuilder_SetHost(builder, valueW);
7729  todo_wine_if(prop->todo) {
7730  ok(hr == prop->expected,
7731  "Error: IUriBuilder_SetHost returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7732  hr, prop->expected, test_index);
7733  }
7734  break;
7735  case Uri_PROPERTY_PASSWORD:
7736  hr = IUriBuilder_SetPassword(builder, valueW);
7737  todo_wine_if(prop->todo) {
7738  ok(hr == prop->expected,
7739  "Error: IUriBuilder_SetPassword returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7740  hr, prop->expected, test_index);
7741  }
7742  break;
7743  case Uri_PROPERTY_PATH:
7744  hr = IUriBuilder_SetPath(builder, valueW);
7745  todo_wine_if(prop->todo) {
7746  ok(hr == prop->expected,
7747  "Error: IUriBuilder_SetPath returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7748  hr, prop->expected, test_index);
7749  }
7750  break;
7751  case Uri_PROPERTY_QUERY:
7752  hr = IUriBuilder_SetQuery(builder, valueW);
7753  todo_wine_if(prop->todo) {
7754  ok(hr == prop->expected,
7755  "Error: IUriBuilder_SetQuery returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7756  hr, prop->expected, test_index);
7757  }
7758  break;
7759  case Uri_PROPERTY_SCHEME_NAME:
7760  hr = IUriBuilder_SetSchemeName(builder, valueW);
7761  todo_wine_if(prop->todo) {
7762  ok(hr == prop->expected,
7763  "Error: IUriBuilder_SetSchemeName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7764  hr, prop->expected, test_index);
7765  }
7766  break;
7767  case Uri_PROPERTY_USER_NAME:
7768  hr = IUriBuilder_SetUserName(builder, valueW);
7769  todo_wine_if(prop->todo) {
7770  ok(hr == prop->expected,
7771  "Error: IUriBuilder_SetUserName returned 0x%08x, expected 0x%08x on uri_builder_tests[%d].\n",
7772  hr, prop->expected, test_index);
7773  }
7774  break;
7775  default:
7776  trace("Unsupported operation for %d on uri_builder_tests[%d].\n", prop->property, test_index);
7777  }
7778 
7779  heap_free(valueW);
7780 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
Uri_PROPERTY property
Definition: uri.c:5309
static const WCHAR valueW[]
Definition: object.c:48
#define todo_wine_if(is_todo)
Definition: test.h:163
#define trace
Definition: atltest.h:70
LONG HRESULT
Definition: typedefs.h:78
const char * value
Definition: uri.c:5307
HRESULT expected
Definition: uri.c:5310
#define ok(value,...)
Definition: atltest.h:57
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by test_IUriBuilder().

◆ ClassFactory_AddRef()

static ULONG WINAPI ClassFactory_AddRef ( IClassFactory iface)
static

Definition at line 10726 of file uri.c.

10727 {
10728  return 2;
10729 }

◆ ClassFactory_CreateInstance()

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

Definition at line 10736 of file uri.c.

10738 {
10739  ok(0, "unexpected call\n");
10740  return E_NOTIMPL;
10741 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ ClassFactory_LockServer()

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

Definition at line 10743 of file uri.c.

10744 {
10745  ok(0, "unexpected call\n");
10746  return S_OK;
10747 }
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57

◆ ClassFactory_QueryInterface()

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

Definition at line 10715 of file uri.c.

10716 {
10717  if(IsEqualGUID(&IID_IInternetProtocolInfo, riid)) {
10718  *ppv = &protocol_info;
10719  return S_OK;
10720  }
10721 
10722  ok(0, "unexpected call\n");
10723  return E_NOINTERFACE;
10724 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static IInternetProtocolInfo protocol_info
Definition: uri.c:10713
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ ClassFactory_Release()

static ULONG WINAPI ClassFactory_Release ( IClassFactory iface)
static

Definition at line 10731 of file uri.c.

10732 {
10733  return 1;
10734 }

◆ compute_expected_props()

static DWORD compute_expected_props ( uri_properties test,
DWORD mask 
)
static

Definition at line 8393 of file uri.c.

8394 {
8395  DWORD ret = 0, i;
8396 
8397  *mask = 0;
8398 
8399  for(i=Uri_PROPERTY_STRING_START; i <= Uri_PROPERTY_STRING_LAST; i++) {
8400  if(test->str_props[i-Uri_PROPERTY_STRING_START].expected == S_OK)
8401  ret |= 1<<i;
8402  if(test->str_props[i-Uri_PROPERTY_STRING_START].value2 == NULL ||
8403  test->str_props[i-Uri_PROPERTY_STRING_START].expected ==
8404  test->str_props[i-Uri_PROPERTY_STRING_START].expected2)
8405  *mask |= 1<<i;
8406  }
8407 
8408  for(i=Uri_PROPERTY_DWORD_START; i <= Uri_PROPERTY_DWORD_LAST; i++) {
8409  if(test->dword_props[i-Uri_PROPERTY_DWORD_START].expected == S_OK)
8410  ret |= 1<<i;
8411  *mask |= 1<<i;
8412  }
8413 
8414  return ret;
8415 }
#define test
Definition: rosglue.h:37
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLenum GLint GLuint mask
Definition: glext.h:6028
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define S_OK
Definition: intsafe.h:59

Referenced by test_IUri_GetProperties(), and test_IUri_HasProperty().

◆ custom_uri_AddRef()

static ULONG WINAPI custom_uri_AddRef ( IUri iface)
static

Definition at line 8542 of file uri.c.

8543 {
8544  struct custom_uri *uri = impl_from_IUri(iface);
8545  return IUri_AddRef(uri->uri);
8546 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetAbsoluteUri()

static HRESULT WINAPI custom_uri_GetAbsoluteUri ( IUri iface,
BSTR value 
)
static

Definition at line 8578 of file uri.c.

8579 {
8580  struct custom_uri *uri = impl_from_IUri(iface);
8581  return IUri_GetAbsoluteUri(uri->uri, value);
8582 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetAuthority()

static HRESULT WINAPI custom_uri_GetAuthority ( IUri iface,
BSTR value 
)
static

Definition at line 8584 of file uri.c.

8585 {
8586  struct custom_uri *uri = impl_from_IUri(iface);
8587  return IUri_GetAbsoluteUri(uri->uri, value);
8588 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetDisplayUri()

static HRESULT WINAPI custom_uri_GetDisplayUri ( IUri iface,
BSTR value 
)
static

Definition at line 8590 of file uri.c.

8591 {
8592  struct custom_uri *uri = impl_from_IUri(iface);
8593  return IUri_GetAbsoluteUri(uri->uri, value);
8594 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetDomain()

static HRESULT WINAPI custom_uri_GetDomain ( IUri iface,
BSTR value 
)
static

Definition at line 8596 of file uri.c.

8597 {
8598  struct custom_uri *uri = impl_from_IUri(iface);
8599  return IUri_GetAbsoluteUri(uri->uri, value);
8600 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetExtension()

static HRESULT WINAPI custom_uri_GetExtension ( IUri iface,
BSTR value 
)
static

Definition at line 8602 of file uri.c.

8603 {
8604  struct custom_uri *uri = impl_from_IUri(iface);
8605  return IUri_GetAbsoluteUri(uri->uri, value);
8606 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetFragment()

static HRESULT WINAPI custom_uri_GetFragment ( IUri iface,
BSTR value 
)
static

Definition at line 8608 of file uri.c.

8609 {
8610  struct custom_uri *uri = impl_from_IUri(iface);
8611  return IUri_GetAbsoluteUri(uri->uri, value);
8612 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetHost()

static HRESULT WINAPI custom_uri_GetHost ( IUri iface,
BSTR value 
)
static

Definition at line 8614 of file uri.c.

8615 {
8616  struct custom_uri *uri = impl_from_IUri(iface);
8617  return IUri_GetAbsoluteUri(uri->uri, value);
8618 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetHostType()

static HRESULT WINAPI custom_uri_GetHostType ( IUri iface,
DWORD value 
)
static

Definition at line 8668 of file uri.c.

8669 {
8670  struct custom_uri *uri = impl_from_IUri(iface);
8671  return IUri_GetHostType(uri->uri, value);
8672 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPassword()

static HRESULT WINAPI custom_uri_GetPassword ( IUri iface,
BSTR value 
)
static

Definition at line 8620 of file uri.c.

8621 {
8622  struct custom_uri *uri = impl_from_IUri(iface);
8623  return IUri_GetAbsoluteUri(uri->uri, value);
8624 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPath()

static HRESULT WINAPI custom_uri_GetPath ( IUri iface,
BSTR value 
)
static

Definition at line 8626 of file uri.c.

8627 {
8628  struct custom_uri *uri = impl_from_IUri(iface);
8629  return IUri_GetAbsoluteUri(uri->uri, value);
8630 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPathAndQuery()

static HRESULT WINAPI custom_uri_GetPathAndQuery ( IUri iface,
BSTR value 
)
static

Definition at line 8632 of file uri.c.

8633 {
8634  struct custom_uri *uri = impl_from_IUri(iface);
8635  return IUri_GetAbsoluteUri(uri->uri, value);
8636 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPort()

static HRESULT WINAPI custom_uri_GetPort ( IUri iface,
DWORD value 
)
static

Definition at line 8674 of file uri.c.

8675 {
8676  struct custom_uri *uri = impl_from_IUri(iface);
8677  return IUri_GetPort(uri->uri, value);
8678 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetProperties()

static HRESULT WINAPI custom_uri_GetProperties ( IUri iface,
DWORD flags 
)
static

Definition at line 8692 of file uri.c.

8693 {
8694  struct custom_uri *uri = impl_from_IUri(iface);
8695  return IUri_GetProperties(uri->uri, flags);
8696 }
const char * uri
Definition: sec_mgr.c:1588
GLbitfield flags
Definition: glext.h:7161
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPropertyBSTR()

static HRESULT WINAPI custom_uri_GetPropertyBSTR ( IUri iface,
Uri_PROPERTY  property,
BSTR value,
DWORD  flags 
)
static

Definition at line 8554 of file uri.c.

8555 {
8556  struct custom_uri *uri = impl_from_IUri(iface);
8557  return IUri_GetPropertyBSTR(uri->uri, property, value, flags);
8558 }
const char * uri
Definition: sec_mgr.c:1588
GLbitfield flags
Definition: glext.h:7161
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPropertyDWORD()

static HRESULT WINAPI custom_uri_GetPropertyDWORD ( IUri iface,
Uri_PROPERTY  property,
DWORD value,
DWORD  flags 
)
static

Definition at line 8566 of file uri.c.

8567 {
8568  struct custom_uri *uri = impl_from_IUri(iface);
8569  return IUri_GetPropertyDWORD(uri->uri, property, value, flags);
8570 }
const char * uri
Definition: sec_mgr.c:1588
GLbitfield flags
Definition: glext.h:7161
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetPropertyLength()

static HRESULT WINAPI custom_uri_GetPropertyLength ( IUri iface,
Uri_PROPERTY  property,
DWORD length,
DWORD  flags 
)
static

Definition at line 8560 of file uri.c.

8561 {
8562  struct custom_uri *uri = impl_from_IUri(iface);
8563  return IUri_GetPropertyLength(uri->uri, property, length, flags);
8564 }
const char * uri
Definition: sec_mgr.c:1588
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
GLbitfield flags
Definition: glext.h:7161
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetQuery()

static HRESULT WINAPI custom_uri_GetQuery ( IUri iface,
BSTR value 
)
static

Definition at line 8638 of file uri.c.

8639 {
8640  struct custom_uri *uri = impl_from_IUri(iface);
8641  return IUri_GetAbsoluteUri(uri->uri, value);
8642 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetRawUri()

static HRESULT WINAPI custom_uri_GetRawUri ( IUri iface,
BSTR value 
)
static

Definition at line 8644 of file uri.c.

8645 {
8646  struct custom_uri *uri = impl_from_IUri(iface);
8647  return IUri_GetAbsoluteUri(uri->uri, value);
8648 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetScheme()

static HRESULT WINAPI custom_uri_GetScheme ( IUri iface,
DWORD value 
)
static

Definition at line 8680 of file uri.c.

8681 {
8682  struct custom_uri *uri = impl_from_IUri(iface);
8683  return IUri_GetScheme(uri->uri, value);
8684 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetSchemeName()

static HRESULT WINAPI custom_uri_GetSchemeName ( IUri iface,
BSTR value 
)
static

Definition at line 8650 of file uri.c.

8651 {
8652  struct custom_uri *uri = impl_from_IUri(iface);
8653  return IUri_GetSchemeName(uri->uri, value);
8654 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetUserInfo()

static HRESULT WINAPI custom_uri_GetUserInfo ( IUri iface,
BSTR value 
)
static

Definition at line 8656 of file uri.c.

8657 {
8658  struct custom_uri *uri = impl_from_IUri(iface);
8659  return IUri_GetUserInfo(uri->uri, value);
8660 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetUserName()

static HRESULT WINAPI custom_uri_GetUserName ( IUri iface,
BSTR value 
)
static

Definition at line 8662 of file uri.c.

8663 {
8664  struct custom_uri *uri = impl_from_IUri(iface);
8665  return IUri_GetUserName(uri->uri, value);
8666 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_GetZone()

static HRESULT WINAPI custom_uri_GetZone ( IUri iface,
DWORD value 
)
static

Definition at line 8686 of file uri.c.

8687 {
8688  struct custom_uri *uri = impl_from_IUri(iface);
8689  return IUri_GetZone(uri->uri, value);
8690 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_HasProperty()

static HRESULT WINAPI custom_uri_HasProperty ( IUri iface,
Uri_PROPERTY  property,
BOOL has_property 
)
static

Definition at line 8572 of file uri.c.

8573 {
8574  struct custom_uri *uri = impl_from_IUri(iface);
8575  return IUri_HasProperty(uri->uri, property, has_property);
8576 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_IsEqual()

static HRESULT WINAPI custom_uri_IsEqual ( IUri iface,
IUri pUri,
BOOL is_equal 
)
static

Definition at line 8698 of file uri.c.

8699 {
8700  struct custom_uri *uri = impl_from_IUri(iface);
8701  return IUri_IsEqual(uri->uri, pUri, is_equal);
8702 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ custom_uri_QueryInterface()

static HRESULT WINAPI custom_uri_QueryInterface ( IUri iface,
REFIID  iid,
void **  out 
)
static

Definition at line 8529 of file uri.c.

8530 {
8531  if (IsEqualIID(iid, &IID_IUri) || IsEqualIID(iid, &IID_IUnknown))
8532  {
8533  *out = iface;
8534  IUri_AddRef(iface);
8535  return S_OK;
8536  }
8537 
8538  *out = NULL;
8539  return E_NOINTERFACE;
8540 }
#define E_NOINTERFACE
Definition: winerror.h:2364
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
static FILE * out
Definition: regtests2xml.c:44
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ custom_uri_Release()

static ULONG WINAPI custom_uri_Release ( IUri iface)
static

Definition at line 8548 of file uri.c.

8549 {
8550  struct custom_uri *uri = impl_from_IUri(iface);
8551  return IUri_Release(uri->uri);
8552 }
const char * uri
Definition: sec_mgr.c:1588
static struct custom_uri * impl_from_IUri(IUri *iface)
Definition: uri.c:8524

◆ DEFINE_EXPECT() [1/2]

DEFINE_EXPECT ( CombineUrl  )

◆ DEFINE_EXPECT() [2/2]

DEFINE_EXPECT ( ParseUrl  )

◆ DEFINE_GUID()

DEFINE_GUID ( CLSID_CUri  ,
0xDF2FCE13  ,
0x25EC  ,
0x45BB  ,
0x9D  ,
0x4C  ,
0xCE  ,
0xCD  ,
0x47  ,
0xC2  ,
0x43  ,
0x0C   
)

◆ get_refcnt()

static ULONG get_refcnt ( IUri uri)
inlinestatic

Definition at line 7707 of file uri.c.

7707  {
7708  IUri_AddRef(uri);
7709  return IUri_Release(uri);
7710 }
const char * uri
Definition: sec_mgr.c:1588

Referenced by test_CreateIUriBuilder(), and test_IUriBuilder_IUriProperty().

◆ HRESULT()

static HRESULT ( WINAPI pCreateUri)
static

◆ impl_from_IUri()

◆ InternetProtocolInfo_AddRef()

static ULONG WINAPI InternetProtocolInfo_AddRef ( IInternetProtocolInfo iface)
static

Definition at line 10642 of file uri.c.

10643 {
10644  return 2;
10645 }

◆ InternetProtocolInfo_CombineUrl()

static HRESULT WINAPI InternetProtocolInfo_CombineUrl ( IInternetProtocolInfo iface,
LPCWSTR  pwzBaseUrl,
LPCWSTR  pwzRelativeUrl,
DWORD  dwCombineFlags,
LPWSTR  pwzResult,
DWORD  cchResult,
DWORD pcchResult,
DWORD  dwReserved 
)
static

Definition at line 10669 of file uri.c.

10672 {
10673  CHECK_EXPECT(CombineUrl);
10674  ok(!lstrcmpW(pwzBaseUrl, combine_baseW), "Error: Expected %s, but got %s instead.\n",
10675  wine_dbgstr_w(combine_baseW), wine_dbgstr_w(pwzBaseUrl));
10676  ok(!lstrcmpW(pwzRelativeUrl, combine_relativeW), "Error: Expected %s, but got %s instead.\n",
10677  wine_dbgstr_w(combine_relativeW), wine_dbgstr_w(pwzRelativeUrl));
10679  "Error: Expected 0, but got 0x%08x.\n", dwCombineFlags);
10680  ok(cchResult == INTERNET_MAX_URL_LENGTH+1, "Error: Got %d.\n", cchResult);
10681 
10682  memcpy(pwzResult, combine_resultW, sizeof(combine_resultW));
10683  *pcchResult = lstrlenW(combine_resultW);
10684 
10685  return S_OK;
10686 }
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define URL_DONT_UNESCAPE_EXTRA_INFO
Definition: shlwapi.h:1218
#define lstrlenW
Definition: compat.h:416
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
#define URL_FILE_USE_PATHURL
Definition: shlwapi.h:1226
#define URL_DONT_SIMPLIFY
Definition: shlwapi.h:1214
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static const WCHAR combine_relativeW[]
Definition: uri.c:89
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
#define CHECK_EXPECT(func)
Definition: uri.c:50
static const WCHAR combine_resultW[]
Definition: uri.c:90
static const WCHAR combine_baseW[]
Definition: uri.c:87

◆ InternetProtocolInfo_CompareUrl()

static HRESULT WINAPI InternetProtocolInfo_CompareUrl ( IInternetProtocolInfo iface,
LPCWSTR  pwzUrl1,
LPCWSTR  pwzUrl2,
DWORD  dwCompareFlags 
)
static

Definition at line 10688 of file uri.c.

10690 {
10691  ok(0, "unexpected call\n");
10692  return E_NOTIMPL;
10693 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InternetProtocolInfo_ParseUrl()

static HRESULT WINAPI InternetProtocolInfo_ParseUrl ( IInternetProtocolInfo iface,
LPCWSTR  pwzUrl,
PARSEACTION  ParseAction,
DWORD  dwParseFlags,
LPWSTR  pwzResult,
DWORD  cchResult,
DWORD pcchResult,
DWORD  dwReserved 
)
static

Definition at line 10652 of file uri.c.

10655 {
10656  CHECK_EXPECT(ParseUrl);
10657  ok(!lstrcmpW(pwzUrl, parse_urlW), "Error: Expected %s, but got %s instead.\n",
10659  ok(ParseAction == parse_action, "Error: Expected %d, but got %d.\n", parse_action, ParseAction);
10660  ok(dwParseFlags == parse_flags, "Error: Expected 0x%08x, but got 0x%08x.\n", parse_flags, dwParseFlags);
10661  ok(cchResult == 200, "Error: Got %d.\n", cchResult);
10662 
10663  memcpy(pwzResult, parse_resultW, sizeof(parse_resultW));
10664  *pcchResult = lstrlenW(parse_resultW);
10665 
10666  return S_OK;
10667 }
static const WCHAR parse_urlW[]
Definition: uri.c:94
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define lstrlenW
Definition: compat.h:416
static const WCHAR parse_resultW[]
Definition: uri.c:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static DWORD parse_flags
Definition: uri.c:98
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
#define CHECK_EXPECT(func)
Definition: uri.c:50
static PARSEACTION parse_action
Definition: uri.c:97

◆ InternetProtocolInfo_QueryInfo()

static HRESULT WINAPI InternetProtocolInfo_QueryInfo ( IInternetProtocolInfo iface,
LPCWSTR  pwzUrl,
QUERYOPTION  OueryOption,
DWORD  dwQueryFlags,
LPVOID  pBuffer,
DWORD  cbBuffer,
DWORD pcbBuf,
DWORD  dwReserved 
)
static

Definition at line 10695 of file uri.c.

10698 {
10699  ok(0, "unexpected call\n");
10700  return E_NOTIMPL;
10701 }
#define ok(value,...)
Definition: atltest.h:57
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ InternetProtocolInfo_QueryInterface()

static HRESULT WINAPI InternetProtocolInfo_QueryInterface ( IInternetProtocolInfo iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 10635 of file uri.c.

10637 {
10638  ok(0, "unexpected call\n");
10639  return E_NOINTERFACE;
10640 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define ok(value,...)
Definition: atltest.h:57

◆ InternetProtocolInfo_Release()

static ULONG WINAPI InternetProtocolInfo_Release ( IInternetProtocolInfo iface)
static

Definition at line 10647 of file uri.c.

10648 {
10649  return 1;
10650 }

◆ register_protocols()

static void register_protocols ( void  )
static

Definition at line 10759 of file uri.c.

10760 {
10762  HRESULT hres;
10763 
10764  hres = pCoInternetGetSession(0, &session, 0);
10765  ok(hres == S_OK, "CoInternetGetSession failed: %08x\n", hres);
10766  if(FAILED(hres))
10767  return;
10768 
10769  hres = IInternetSession_RegisterNameSpace(session, &protocol_cf, &IID_NULL,
10770  winetestW, 0, NULL, 0);
10771  ok(hres == S_OK, "RegisterNameSpace failed: %08x\n", hres);
10772 
10773  IInternetSession_Release(session);
10774 }
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
static const WCHAR winetestW[]
Definition: uri.c:92
LONG HRESULT
Definition: typedefs.h:78
static IClassFactory protocol_cf
Definition: uri.c:10757
#define IID_NULL
Definition: guiddef.h:98
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57

Referenced by START_TEST().

◆ START_TEST()

START_TEST ( uri  )

Definition at line 11653 of file uri.c.

11653  {
11654  HMODULE hurlmon;
11655 
11656  hurlmon = GetModuleHandleA("urlmon.dll");
11657  pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession");
11658  pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri");
11659  pCreateUriWithFragment = (void*) GetProcAddress(hurlmon, "CreateUriWithFragment");
11660  pCreateIUriBuilder = (void*) GetProcAddress(hurlmon, "CreateIUriBuilder");
11661  pCoInternetCombineIUri = (void*) GetProcAddress(hurlmon, "CoInternetCombineIUri");
11662  pCoInternetCombineUrlEx = (void*) GetProcAddress(hurlmon, "CoInternetCombineUrlEx");
11663  pCoInternetParseIUri = (void*) GetProcAddress(hurlmon, "CoInternetParseIUri");
11664  pCreateURLMonikerEx = (void*) GetProcAddress(hurlmon, "CreateURLMonikerEx");
11665  pCreateURLMonikerEx2 = (void*) GetProcAddress(hurlmon, "CreateURLMonikerEx2");
11666 
11667  if(!pCreateUri) {
11668  win_skip("CreateUri is not present, skipping tests.\n");
11669  return;
11670  }
11671 
11672  trace("test CreateUri invalid flags...\n");
11674 
11675  trace("test CreateUri invalid args...\n");
11677 
11678  trace("test CreateUri invalid URIs...\n");
11680 
11681  trace("test IUri_GetPropertyBSTR...\n");
11683 
11684  trace("test IUri_GetPropertyDWORD...\n");
11686 
11687  trace("test IUri_GetStrProperties...\n");
11689 
11690  trace("test IUri_GetDwordProperties...\n");
11692 
11693  trace("test IUri_GetPropertyLength...\n");
11695 
11696  trace("test IUri_GetProperties...\n");
11698 
11699  trace("test IUri_HasProperty...\n");
11701 
11702  trace("test IUri_IsEqual...\n");
11704 
11705  trace("test CreateUriWithFragment invalid args...\n");
11707 
11708  trace("test CreateUriWithFragment invalid flags...\n");
11710 
11711  trace("test CreateUriWithFragment...\n");
11713 
11714  trace("test CreateIUriBuilder...\n");
11716 
11717  trace("test IUriBuilder_CreateInvalidArgs...\n");
11719 
11720  trace("test IUriBuilder...\n");
11721  test_IUriBuilder();
11722 
11723  trace("test IUriBuilder_GetInvalidArgs...\n");
11725 
11726  trace("test IUriBuilder_HasBeenModified...\n");
11728 
11729  trace("test IUriBuilder_IUriProperty...\n");
11731 
11732  trace("test IUriBuilder_RemoveProperties...\n");
11734 
11735  trace("test IUriBuilder miscellaneous...\n");
11737 
11738  trace("test IUriBuilderFactory...\n");
11740 
11741  trace("test CoInternetCombineIUri...\n");
11743 
11744  trace("test CoInternetCombineUrlEx...\n");
11746 
11747  trace("test CoInternetParseIUri Invalid Args...\n");
11749 
11750  trace("test CoInternetParseIUri...\n");
11752 
11754 
11755  trace("test CoInternetCombineIUri pluggable...\n");
11757 
11758  trace("test CoInternetCombineUrlEx Pluggable...\n");
11760 
11761  trace("test CoInternetParseIUri pluggable...\n");
11763 
11764  trace("test CreateURLMoniker...\n");
11766 
11767  CoInitialize(NULL);
11768 
11769  trace("test IPersistStream...\n");
11771 
11772  trace("test uninitialized Uri...\n");
11774 
11775  CoUninitialize();
11777 }
static void test_CreateIUriBuilder(void)
Definition: uri.c:8885
static void test_UninitializedUri(void)
Definition: uri.c:11561
static void test_CreateUri_InvalidUri(void)
Definition: uri.c:7825
static void test_CoInternetParseIUri(void)
Definition: uri.c:11044
static void test_CoInternetParseIUri_InvalidArgs(void)
Definition: uri.c:10953
static void test_IUri_GetStrProperties(void)
Definition: uri.c:7976
static void test_IUriBuilder_CreateInvalidArgs(void)
Definition: uri.c:9072
static void test_IUri_GetPropertyDWORD(void)
Definition: uri.c:7921
static void test_CreateURLMoniker(void)
Definition: uri.c:11237
static void test_CoInternetCombineIUri(void)
Definition: uri.c:10541
static void test_CoInternetCombineUrlEx(void)
Definition: uri.c:10830
smooth NULL
Definition: ftsmooth.c:416
static void test_IUriBuilderFactory(void)
Definition: uri.c:10454
static void test_CoInternetCombineUrlEx_Pluggable(void)
Definition: uri.c:10921
static void unregister_protocols(void)
Definition: uri.c:10776
static void test_IUri_GetPropertyLength(void)
Definition: uri.c:8326
static void test_CoInternetParseIUri_Pluggable(void)
Definition: uri.c:11084
#define trace
Definition: atltest.h:70
static void test_IUriBuilder(void)
Definition: uri.c:10019
static void test_CreateUriWithFragment(void)
Definition: uri.c:8847
static void test_IUriBuilder_GetInvalidArgs(void)
Definition: uri.c:9164
static void test_IUriBuilder_RemoveProperties(void)
Definition: uri.c:10342
static void test_CreateUriWithFragment_InvalidArgs(void)
Definition: uri.c:8813
static void test_IUriBuilder_HasBeenModified(void)
Definition: uri.c:10099
static void test_IUri_HasProperty(void)
Definition: uri.c:8466
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
static void register_protocols(void)
Definition: uri.c:10759
static void test_IUri_GetPropertyBSTR(void)
Definition: uri.c:7845
static void test_IPersistStream(void)
Definition: uri.c:11330
static void test_IUriBuilder_IUriProperty(void)
Definition: uri.c:10205
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static void test_CoInternetCombineIUri_Pluggable(void)
Definition: uri.c:10791
static void test_IUriBuilder_Misc(void)
Definition: uri.c:10426
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
static void test_CreateUri_InvalidArgs(void)
Definition: uri.c:7800
static void test_IUri_GetDwordProperties(void)
Definition: uri.c:8237
#define GetProcAddress(x, y)
Definition: compat.h:419
static void test_IUri_IsEqual(void)
Definition: uri.c:8736
static void test_CreateUriWithFragment_InvalidFlags(void)
Definition: uri.c:8833
static void test_IUri_GetProperties(void)
Definition: uri.c:8417
#define win_skip
Definition: test.h:149
static void test_CreateUri_InvalidFlags(void)
Definition: uri.c:7786

◆ strcmp_aw()

◆ test_CoInternetCombineIUri()

static void test_CoInternetCombineIUri ( void  )
static

Definition at line 10541 of file uri.c.

10541  {
10542  HRESULT hr;
10543  IUri *base, *relative, *result;
10544  DWORD i;
10545 
10546  base = NULL;
10547  hr = pCreateUri(http_urlW, 0, 0, &base);
10548  ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr);
10549  if(SUCCEEDED(hr)) {
10550  result = (void*) 0xdeadbeef;
10551  hr = pCoInternetCombineIUri(base, NULL, 0, &result, 0);
10552  ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
10553  ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result);
10554  }
10555 
10556  relative = NULL;
10557  hr = pCreateUri(http_urlW, 0, 0, &relative);
10558  ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x.\n", hr);
10559  if(SUCCEEDED(hr)) {
10560  result = (void*) 0xdeadbeef;
10561  hr = pCoInternetCombineIUri(NULL, relative, 0, &result, 0);
10562  ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
10563  ok(!result, "Error: Expected 'result' to be NULL, was %p.\n", result);
10564  }
10565 
10566  hr = pCoInternetCombineIUri(base, relative, 0, NULL, 0);
10567  ok(hr == E_INVALIDARG, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
10568 
10569  if(base) IUri_Release(base);
10570  if(relative) IUri_Release(relative);
10571 
10572  for(i = 0; i < ARRAY_SIZE(uri_combine_tests); ++i) {
10573  LPWSTR baseW = a2w(uri_combine_tests[i].base_uri);
10574 
10575  hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base);
10576  ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i);
10577  if(SUCCEEDED(hr)) {
10578  LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri);
10579 
10580  hr = pCreateUri(relativeW, uri_combine_tests[i].relative_create_flags, 0, &relative);
10581  ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, got 0x%08x on uri_combine_tests[%d].\n", hr, i);
10582  if(SUCCEEDED(hr)) {
10583  result = NULL;
10584 
10585  hr = pCoInternetCombineIUri(base, relative, uri_combine_tests[i].combine_flags, &result, 0);
10588  "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n",
10590  if(SUCCEEDED(hr)) {
10591  DWORD j;
10592 
10593  for(j = 0; j < ARRAY_SIZE(uri_combine_tests[i].str_props); ++j) {
10595  BSTR received;
10596 
10597  hr = IUri_GetPropertyBSTR(result, j, &received, 0);
10598  todo_wine_if(prop.todo) {
10599  ok(hr == prop.expected,
10600  "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n",
10601  hr, prop.expected, i, j);
10602  ok(!strcmp_aw(prop.value, received) ||
10604  "Error: Expected \"%s\" but got %s instead on uri_combine_tests[%d].str_props[%d].\n",
10605  prop.value, wine_dbgstr_w(received), i, j);
10606  }
10608  }
10609 
10610  for(j = 0; j < ARRAY_SIZE(uri_combine_tests[i].dword_props); ++j) {
10612  DWORD received;
10613 
10614  hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0);
10615  todo_wine_if(prop.todo) {
10616  ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE),
10617  "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n",
10618  hr, prop.expected, i, j);
10619  if(!prop.broken_combine_hres || hr != S_FALSE)
10620  ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n",
10621  prop.value, received, i, j);
10622  }
10623  }
10624  }
10625  if(result) IUri_Release(result);
10626  }
10627  if(relative) IUri_Release(relative);
10628  heap_free(relativeW);
10629  }
10630  if(base) IUri_Release(base);
10631  heap_free(baseW);
10632  }
10633 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
r received
Definition: btrfs.c:2939
BOOL todo
Definition: filedlg.c:313
uri_combine_str_property str_props[URI_STR_PROPERTY_COUNT]
Definition: uri.c:6437
OLECHAR * BSTR
Definition: compat.h:1943
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLuint base
Definition: 3dtext.c:35
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
const char * broken_value
Definition: uri.c:6424
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define todo_wine_if(is_todo)
Definition: test.h:163
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR http_urlW[]
Definition: uri.c:82
uri_dword_property dword_props[URI_DWORD_PROPERTY_COUNT]
Definition: uri.c:6438
static const uri_combine_test uri_combine_tests[]
Definition: uri.c:6441
#define broken(x)
Definition: _sntprintf.h:21
HRESULT expected
Definition: uri.c:125
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static WCHAR baseW[MAX_PATH]
Definition: FindFiles.c:24
WCHAR * LPWSTR
Definition: xmlstorage.h:184
GLuint64EXT * result
Definition: glext.h:11304
BOOL broken_combine_hres
Definition: uri.c:127
BOOL expected
Definition: store.c:2063
#define SUCCEEDED(hr)
Definition: intsafe.h:57
const char * value
Definition: uri.c:6421
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

Referenced by START_TEST().

◆ test_CoInternetCombineIUri_Pluggable()

static void test_CoInternetCombineIUri_Pluggable ( void  )
static

Definition at line 10791 of file uri.c.

10791  {
10792  HRESULT hr;
10793  IUri *base = NULL;
10794 
10795  hr = pCreateUri(combine_baseW, 0, 0, &base);
10796  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
10797  if(SUCCEEDED(hr)) {
10798  IUri *relative = NULL;
10799 
10800  hr = pCreateUri(combine_relativeW, Uri_CREATE_ALLOW_RELATIVE, 0, &relative);
10801  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
10802  if(SUCCEEDED(hr)) {
10803  IUri *result = NULL;
10804 
10805  SET_EXPECT(CombineUrl);
10806 
10807  hr = pCoInternetCombineIUri(base, relative, URL_DONT_SIMPLIFY|URL_FILE_USE_PATHURL|URL_DONT_UNESCAPE_EXTRA_INFO,
10808  &result, 0);
10809  ok(hr == S_OK, "Error: CoInternetCombineIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
10810 
10811  CHECK_CALLED(CombineUrl);
10812 
10813  if(SUCCEEDED(hr)) {
10814  BSTR received = NULL;
10815  hr = IUri_GetAbsoluteUri(result, &received);
10816  ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr);
10817  if(SUCCEEDED(hr)) {
10818  ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n",
10820  }
10822  }
10823  if(result) IUri_Release(result);
10824  }
10825  if(relative) IUri_Release(relative);
10826  }
10827  if(base) IUri_Release(base);
10828 }
#define CHECK_CALLED(func)
Definition: uri.c:63
HRESULT hr
Definition: shlfolder.c:183
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define SET_EXPECT(func)
Definition: uri.c:47
r received
Definition: btrfs.c:2939
#define URL_DONT_UNESCAPE_EXTRA_INFO
Definition: shlwapi.h:1218
OLECHAR * BSTR
Definition: compat.h:1943
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
#define URL_FILE_USE_PATHURL
Definition: shlwapi.h:1226
#define URL_DONT_SIMPLIFY
Definition: shlwapi.h:1214
static const WCHAR combine_relativeW[]
Definition: uri.c:89
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
GLuint64EXT * result
Definition: glext.h:11304
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static const WCHAR combine_resultW[]
Definition: uri.c:90
static const WCHAR combine_baseW[]
Definition: uri.c:87

Referenced by START_TEST().

◆ test_CoInternetCombineUrlEx()

static void test_CoInternetCombineUrlEx ( void  )
static

Definition at line 10830 of file uri.c.

10830  {
10831  HRESULT hr;
10832  IUri *base, *result;
10833  DWORD i;
10834 
10835  base = NULL;
10836  hr = pCreateUri(http_urlW, 0, 0, &base);
10837  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
10838  if(SUCCEEDED(hr)) {
10839  result = (void*) 0xdeadbeef;
10840  hr = pCoInternetCombineUrlEx(base, NULL, 0, &result, 0);
10841  ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
10842  hr, E_UNEXPECTED);
10843  ok(!result, "Error: Expected 'result' to be NULL was %p instead.\n", result);
10844  }
10845 
10846  result = (void*) 0xdeadbeef;
10847  hr = pCoInternetCombineUrlEx(NULL, http_urlW, 0, &result, 0);
10848  ok(hr == E_INVALIDARG, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
10849  hr, E_INVALIDARG);
10850  ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
10851 
10852  result = (void*) 0xdeadbeef;
10853  hr = pCoInternetCombineUrlEx(NULL, NULL, 0, &result, 0);
10854  ok(hr == E_UNEXPECTED, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
10855  hr, E_UNEXPECTED);
10856  ok(!result, "Error: Expected 'result' to be NULL, but was %p instead.\n", result);
10857 
10858  hr = pCoInternetCombineUrlEx(base, http_urlW, 0, NULL, 0);
10859  ok(hr == E_POINTER, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n",
10860  hr, E_POINTER);
10861  if(base) IUri_Release(base);
10862 
10863  for(i = 0; i < ARRAY_SIZE(uri_combine_tests); ++i) {
10864  LPWSTR baseW = a2w(uri_combine_tests[i].base_uri);
10865 
10866  hr = pCreateUri(baseW, uri_combine_tests[i].base_create_flags, 0, &base);
10867  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_combine_tests[%d].\n", hr, i);
10868  if(SUCCEEDED(hr)) {
10869  LPWSTR relativeW = a2w(uri_combine_tests[i].relative_uri);
10870 
10871  hr = pCoInternetCombineUrlEx(base, relativeW, uri_combine_tests[i].combine_flags,
10872  &result, 0);
10875  "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].\n",
10877  if(SUCCEEDED(hr)) {
10878  DWORD j;
10879 
10880  for(j = 0; j < ARRAY_SIZE(uri_combine_tests[i].str_props); ++j) {
10882  BSTR received;
10883  LPCSTR value = (prop.value_ex) ? prop.value_ex : prop.value;
10884 
10885  hr = IUri_GetPropertyBSTR(result, j, &received, 0);
10886  todo_wine_if(prop.todo) {
10887  ok(hr == prop.expected,
10888  "Error: IUri_GetPropertyBSTR returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].str_props[%d].\n",
10889  hr, prop.expected, i, j);
10890  ok(!strcmp_aw(value, received) ||
10892  "Error: Expected \"%s\" but got %s instead on uri_combine_tests[%d].str_props[%d].\n",
10894  }
10896  }
10897 
10898  for(j = 0; j < ARRAY_SIZE(uri_combine_tests[i].dword_props); ++j) {
10900  DWORD received;
10901 
10902  hr = IUri_GetPropertyDWORD(result, j+Uri_PROPERTY_DWORD_START, &received, 0);
10903  todo_wine_if(prop.todo) {
10904  ok(hr == prop.expected || broken(prop.broken_combine_hres && hr == S_FALSE),
10905  "Error: IUri_GetPropertyDWORD returned 0x%08x, expected 0x%08x on uri_combine_tests[%d].dword_props[%d].\n",
10906  hr, prop.expected, i, j);
10907  if(!prop.broken_combine_hres || hr != S_FALSE)
10908  ok(prop.value == received, "Error: Expected %d, but got %d instead on uri_combine_tests[%d].dword_props[%d].\n",
10909  prop.value, received, i, j);
10910  }
10911  }
10912  }
10913  if(result) IUri_Release(result);
10914  heap_free(relativeW);
10915  }
10916  if(base) IUri_Release(base);
10917  heap_free(baseW);
10918  }
10919 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
r received
Definition: btrfs.c:2939
BOOL todo
Definition: filedlg.c:313
uri_combine_str_property str_props[URI_STR_PROPERTY_COUNT]
Definition: uri.c:6437
OLECHAR * BSTR
Definition: compat.h:1943
const char * value_ex
Definition: uri.c:6425
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLuint base
Definition: 3dtext.c:35
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
const char * broken_value
Definition: uri.c:6424
const char * LPCSTR
Definition: xmlstorage.h:183
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define todo_wine_if(is_todo)
Definition: test.h:163
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR http_urlW[]
Definition: uri.c:82
uri_dword_property dword_props[URI_DWORD_PROPERTY_COUNT]
Definition: uri.c:6438
static const uri_combine_test uri_combine_tests[]
Definition: uri.c:6441
#define broken(x)
Definition: _sntprintf.h:21
HRESULT expected
Definition: uri.c:125
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#define E_UNEXPECTED
Definition: winerror.h:2456
static WCHAR baseW[MAX_PATH]
Definition: FindFiles.c:24
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define E_POINTER
Definition: winerror.h:2365
GLuint64EXT * result
Definition: glext.h:11304
BOOL broken_combine_hres
Definition: uri.c:127
BOOL expected
Definition: store.c:2063
#define SUCCEEDED(hr)
Definition: intsafe.h:57
const char * value
Definition: uri.c:6421
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

Referenced by START_TEST().

◆ test_CoInternetCombineUrlEx_Pluggable()

static void test_CoInternetCombineUrlEx_Pluggable ( void  )
static

Definition at line 10921 of file uri.c.

10921  {
10922  HRESULT hr;
10923  IUri *base = NULL;
10924 
10925  hr = pCreateUri(combine_baseW, 0, 0, &base);
10926  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
10927  if(SUCCEEDED(hr)) {
10928  IUri *result = NULL;
10929 
10930  SET_EXPECT(CombineUrl);
10931 
10933  &result, 0);
10934  ok(hr == S_OK, "Error: CoInternetCombineUrlEx returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
10935 
10936  CHECK_CALLED(CombineUrl);
10937 
10938  if(SUCCEEDED(hr)) {
10939  BSTR received = NULL;
10940  hr = IUri_GetAbsoluteUri(result, &received);
10941  ok(hr == S_OK, "Error: Expected S_OK, but got 0x%08x instead.\n", hr);
10942  if(SUCCEEDED(hr)) {
10943  ok(!lstrcmpW(combine_resultW, received), "Error: Expected %s, but got %s.\n",
10945  }
10947  }
10948  if(result) IUri_Release(result);
10949  }
10950  if(base) IUri_Release(base);
10951 }
#define CHECK_CALLED(func)
Definition: uri.c:63
HRESULT hr
Definition: shlfolder.c:183
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define SET_EXPECT(func)
Definition: uri.c:47
r received
Definition: btrfs.c:2939
#define URL_DONT_UNESCAPE_EXTRA_INFO
Definition: shlwapi.h:1218
OLECHAR * BSTR
Definition: compat.h:1943
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
#define URL_FILE_USE_PATHURL
Definition: shlwapi.h:1226
#define URL_DONT_SIMPLIFY
Definition: shlwapi.h:1214
static const WCHAR combine_relativeW[]
Definition: uri.c:89
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
GLuint64EXT * result
Definition: glext.h:11304
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static const WCHAR combine_resultW[]
Definition: uri.c:90
static const WCHAR combine_baseW[]
Definition: uri.c:87

Referenced by START_TEST().

◆ test_CoInternetParseIUri()

static void test_CoInternetParseIUri ( void  )
static

Definition at line 11044 of file uri.c.

11044  {
11045  DWORD i;
11046 
11047  for(i = 0; i < ARRAY_SIZE(uri_parse_tests); ++i) {
11048  HRESULT hr;
11049  IUri *uri;
11050  LPWSTR uriW;
11052 
11053  uriW = a2w(test.uri);
11054  hr = pCreateUri(uriW, test.uri_flags, 0, &uri);
11055  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x on uri_parse_tests[%d].\n", hr, i);
11056  if(SUCCEEDED(hr)) {
11058  DWORD result_len = -1;
11059 
11060  hr = pCoInternetParseIUri(uri, test.action, test.flags, result, INTERNET_MAX_URL_LENGTH+1, &result_len, 0);
11061  todo_wine_if(test.todo)
11062  ok(hr == test.expected,
11063  "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x on uri_parse_tests[%d].\n",
11064  hr, test.expected, i);
11065  if(SUCCEEDED(hr)) {
11066  DWORD len = lstrlenA(test.property);
11067  ok(!strcmp_aw(test.property, result) || (test.property2 && !strcmp_aw(test.property2, result)),
11068  "Error: Expected %s but got %s instead on uri_parse_tests[%d] - %s.\n",
11069  test.property, wine_dbgstr_w(result), i, wine_dbgstr_w(uriW));
11070  ok(len == result_len || (test.property2 && lstrlenA(test.property2) == result_len),
11071  "Error: Expected %d, but got %d instead on uri_parse_tests[%d] - %s.\n",
11072  len, result_len, i, wine_dbgstr_w(uriW));
11073  } else {
11074  ok(!result_len,
11075  "Error: Expected 'result_len' to be 0, but was %d on uri_parse_tests[%d].\n",
11076  result_len, i);
11077  }
11078  }
11079  if(uri) IUri_Release(uri);
11080  heap_free(uriW);
11081  }
11082 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define test
Definition: rosglue.h:37
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
static const uri_parse_test uri_parse_tests[]
Definition: uri.c:7612
#define todo_wine_if(is_todo)
Definition: test.h:163
#define d
Definition: ke_i.h:81
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL Error
Definition: chkdsk.c:66
GLenum GLsizei len
Definition: glext.h:6722
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
HRESULT WINAPI CoInternetParseIUri(IUri *pIUri, PARSEACTION ParseAction, DWORD dwFlags, LPWSTR pwzResult, DWORD cchResult, DWORD *pcchResult, DWORD_PTR dwReserved)
Definition: uri.c:7247
WCHAR * LPWSTR
Definition: xmlstorage.h:184
GLuint64EXT * result
Definition: glext.h:11304
BOOL expected
Definition: store.c:2063
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

Referenced by START_TEST().

◆ test_CoInternetParseIUri_InvalidArgs()

static void test_CoInternetParseIUri_InvalidArgs ( void  )
static

Definition at line 10953 of file uri.c.

10953  {
10954  HRESULT hr;
10955  IUri *uri = NULL;
10956  WCHAR tmp[3];
10957  WCHAR *longurl, *copy;
10958  DWORD result = -1;
10959  DWORD i, len;
10960 
10961  hr = pCoInternetParseIUri(NULL, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0);
10962  ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
10963  hr, E_INVALIDARG);
10964  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
10965 
10966  hr = pCreateUri(http_urlW, 0, 0, &uri);
10967  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
10968  if(SUCCEEDED(hr)) {
10969  DWORD expected_len;
10970 
10971  result = -1;
10972  hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, NULL, 0, &result, 0);
10973  ok(hr == E_INVALIDARG, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
10974  hr, E_INVALIDARG);
10975  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
10976 
10977  hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, NULL, 0);
10978  ok(hr == E_POINTER, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
10979  hr, E_POINTER);
10980 
10981  result = -1;
10982  hr = pCoInternetParseIUri(uri, PARSE_SECURITY_URL, 0, tmp, 3, &result, 0);
10983  ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x expected 0x%08x.\n",
10984  hr, E_FAIL);
10985  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
10986 
10987  result = -1;
10988  hr = pCoInternetParseIUri(uri, PARSE_MIME, 0, tmp, 3, &result, 0);
10989  ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
10990  hr, E_FAIL);
10991  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
10992 
10993  result = -1;
10994  hr = pCoInternetParseIUri(uri, PARSE_SERVER, 0, tmp, 3, &result, 0);
10995  ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
10996  hr, E_FAIL);
10997  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
10998 
10999  result = -1;
11000  hr = pCoInternetParseIUri(uri, PARSE_SECURITY_DOMAIN, 0, tmp, 3, &result, 0);
11001  ok(hr == E_FAIL, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
11002  hr, E_FAIL);
11003  ok(!result, "Error: Expected 'result' to be 0, but was %d.\n", result);
11004 
11005  expected_len = lstrlenW(http_urlW);
11006  result = -1;
11007  hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, tmp, 3, &result, 0);
11009  "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n",
11011  ok(result == expected_len, "Error: Expected 'result' to be %d, but was %d instead.\n",
11012  expected_len, result);
11013  }
11014  if(uri) IUri_Release(uri);
11015 
11016  /* a long url that causes a crash on Wine */
11018  longurl = heap_alloc((len+1)*sizeof(WCHAR));
11019  memcpy(longurl, http_urlW, sizeof(http_urlW));
11020  for(i = ARRAY_SIZE(http_urlW)-1; i < len; i++)
11021  longurl[i] = 'x';
11022  longurl[len] = 0;
11023 
11024  copy = heap_alloc((len+1)*sizeof(WCHAR));
11025  memcpy(copy, longurl, (len+1)*sizeof(WCHAR));
11026 
11027  hr = pCreateUri(longurl, 0, 0, &uri);
11028  ok(SUCCEEDED(hr), "Error: CreateUri returned 0x%08x.\n", hr);
11029  if(SUCCEEDED(hr)) {
11030  result = -1;
11031  memset(longurl, 0xcc, len*sizeof(WCHAR));
11032  hr = pCoInternetParseIUri(uri, PARSE_CANONICALIZE, 0, longurl, len+1, &result, 0);
11033  ok(SUCCEEDED(hr), "Error: CoInternetParseIUri returned 0x%08x.\n", hr);
11034  ok(!lstrcmpW(longurl, copy), "Error: expected long url '%s' but was '%s'.\n",
11035  wine_dbgstr_w(copy), wine_dbgstr_w(longurl));
11036  ok(result == len, "Error: Expected 'result' to be %d, but was %d instead.\n",
11037  len, result);
11038  }
11039  heap_free(longurl);
11040  heap_free(copy);
11041  if(uri) IUri_Release(uri);
11042 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define lstrlenW
Definition: compat.h:416
#define E_FAIL
Definition: ddrawi.h:102
#define STRSAFE_E_INSUFFICIENT_BUFFER
Definition: strsafe.h:103
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define INTERNET_MAX_URL_LENGTH
Definition: session.c:1418
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR http_urlW[]
Definition: uri.c:82
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
Definition: copy.c:51
#define E_POINTER
Definition: winerror.h:2365
GLuint64EXT * result
Definition: glext.h:11304
#define memset(x, y, z)
Definition: compat.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by START_TEST().

◆ test_CoInternetParseIUri_Pluggable()

static void test_CoInternetParseIUri_Pluggable ( void  )
static

Definition at line 11084 of file uri.c.

11084  {
11085  HRESULT hr;
11086  IUri *uri = NULL;
11087 
11088  hr = pCreateUri(parse_urlW, 0, 0, &uri);
11089  ok(SUCCEEDED(hr), "Error: Expected CreateUri to succeed, but got 0x%08x.\n", hr);
11090  if(SUCCEEDED(hr)) {
11091  WCHAR result[200];
11092  DWORD result_len;
11093 
11094  SET_EXPECT(ParseUrl);
11095 
11096  parse_action = PARSE_CANONICALIZE;
11098 
11099  hr = pCoInternetParseIUri(uri, parse_action, parse_flags, result, 200, &result_len, 0);
11100  ok(hr == S_OK, "Error: CoInternetParseIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
11101 
11102  CHECK_CALLED(ParseUrl);
11103 
11104  if(SUCCEEDED(hr)) {
11105  ok(result_len == lstrlenW(parse_resultW), "Error: Expected %d, but got %d.\n",
11106  lstrlenW(parse_resultW), result_len);
11107  ok(!lstrcmpW(result, parse_resultW), "Error: Expected %s, but got %s.\n",
11109  }
11110  }
11111  if(uri) IUri_Release(uri);
11112 }
#define CHECK_CALLED(func)
Definition: uri.c:63
static const WCHAR parse_urlW[]
Definition: uri.c:94
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
#define SET_EXPECT(func)
Definition: uri.c:47
#define lstrlenW
Definition: compat.h:416
static const WCHAR parse_resultW[]
Definition: uri.c:95
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
static DWORD parse_flags
Definition: uri.c:98
#define URL_ESCAPE_UNSAFE
Definition: shlwapi.h:1211
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
#define URL_UNESCAPE
Definition: shlwapi.h:1212
GLuint64EXT * result
Definition: glext.h:11304
static PARSEACTION parse_action
Definition: uri.c:97
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by START_TEST().

◆ test_CreateIUriBuilder()

static void test_CreateIUriBuilder ( void  )
static

Definition at line 8885 of file uri.c.

8885  {
8886  HRESULT hr;
8887  IUriBuilder *builder = NULL;
8888  IUri *uri;
8889 
8890  hr = pCreateIUriBuilder(NULL, 0, 0, NULL);
8891  ok(hr == E_POINTER, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x\n",
8892  hr, E_POINTER);
8893 
8894  /* CreateIUriBuilder increases the ref count of the IUri it receives. */
8895  hr = pCreateUri(http_urlW, 0, 0, &uri);
8896  ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
8897  if(SUCCEEDED(hr)) {
8898  ULONG cur_count, orig_count;
8899 
8900  orig_count = get_refcnt(uri);
8901  hr = pCreateIUriBuilder(uri, 0, 0, &builder);
8902  ok(hr == S_OK, "Error: CreateIUriBuilder returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
8903  ok(builder != NULL, "Error: Expecting builder not to be NULL\n");
8904 
8905  cur_count = get_refcnt(uri);
8906  ok(cur_count == orig_count+1, "Error: Expected the ref count to be %u, but was %u instead.\n", orig_count+1, cur_count);
8907 
8908  if(builder) IUriBuilder_Release(builder);
8909  cur_count = get_refcnt(uri);
8910  ok(cur_count == orig_count, "Error: Expected the ref count to be %u, but was %u instead.\n", orig_count, cur_count);
8911  }
8912  if(uri) IUri_Release(uri);
8913 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR http_urlW[]
Definition: uri.c:82
static ULONG get_refcnt(IUri *uri)
Definition: uri.c:7707
#define S_OK
Definition: intsafe.h:59
#define ok(value,...)
Definition: atltest.h:57
unsigned int ULONG
Definition: retypes.h:1
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by START_TEST().

◆ test_CreateUri_InvalidArgs()

static void test_CreateUri_InvalidArgs ( void  )
static

Definition at line 7800 of file uri.c.

7800  {
7801  HRESULT hr;
7802  IUri *uri = (void*) 0xdeadbeef;
7803 
7804  const WCHAR invalidW[] = {'i','n','v','a','l','i','d',0};
7805  static const WCHAR emptyW[] = {0};
7806 
7807  hr = pCreateUri(http_urlW, 0, 0, NULL);
7808  ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG);
7809 
7810  hr = pCreateUri(NULL, 0, 0, &uri);
7811  ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG);
7812  ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri);
7813 
7814  uri = (void*) 0xdeadbeef;
7815  hr = pCreateUri(invalidW, 0, 0, &uri);
7816  ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
7817  ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri);
7818 
7819  uri = (void*) 0xdeadbeef;
7820  hr = pCreateUri(emptyW, 0, 0, &uri);
7821  ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
7822  ok(uri == NULL, "Error: Expected the IUri to be NULL, but it was %p instead\n", uri);
7823 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
static const WCHAR invalidW[]
Definition: locale.c:46
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR http_urlW[]
Definition: uri.c:82
static const WCHAR emptyW[]
Definition: navigate.c:40
#define ok(value,...)
Definition: atltest.h:57

Referenced by START_TEST().

◆ test_CreateUri_InvalidFlags()

static void test_CreateUri_InvalidFlags ( void  )
static

Definition at line 7786 of file uri.c.

7786  {
7787  DWORD i;
7788 
7789  for(i = 0; i < ARRAY_SIZE(invalid_flag_tests); ++i) {
7790  HRESULT hr;
7791  IUri *uri = (void*) 0xdeadbeef;
7792 
7793  hr = pCreateUri(http_urlW, invalid_flag_tests[i].flags, 0, &uri);
7794  ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08x, expected 0x%08x, flags=0x%08x\n",
7796  ok(uri == NULL, "Error: expected the IUri to be NULL, but it was %p instead\n", uri);
7797  }
7798 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const uri_create_flag_test invalid_flag_tests[]
Definition: uri.c:105
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
static const WCHAR http_urlW[]
Definition: uri.c:82
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
BOOL expected
Definition: store.c:2063

Referenced by START_TEST().

◆ test_CreateUri_InvalidUri()

static void test_CreateUri_InvalidUri ( void  )
static

Definition at line 7825 of file uri.c.

7825  {
7826  DWORD i;
7827 
7828  for(i = 0; i < ARRAY_SIZE(invalid_uri_tests); ++i) {
7830  IUri *uri = NULL;
7831  LPWSTR uriW;
7832  HRESULT hr;
7833 
7834  uriW = a2w(test.uri);
7835  hr = pCreateUri(uriW, test.flags, 0, &uri);
7836  todo_wine_if(test.todo)
7837  ok(hr == E_INVALIDARG, "Error: CreateUri returned 0x%08x, expected 0x%08x on invalid_uri_tests[%d].\n",
7838  hr, E_INVALIDARG, i);
7839  if(uri) IUri_Release(uri);
7840 
7841  heap_free(uriW);
7842  }
7843 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
static const invalid_uri invalid_uri_tests[]
Definition: uri.c:5071
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define test
Definition: rosglue.h:37
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define todo_wine_if(is_todo)
Definition: test.h:163
#define d
Definition: ke_i.h:81
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL Error
Definition: chkdsk.c:66
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL expected
Definition: store.c:2063
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by START_TEST().

◆ test_CreateUriWithFragment()

static void test_CreateUriWithFragment ( void  )
static

Definition at line 8847 of file uri.c.

8847  {
8848  DWORD i;
8849 
8850  for(i = 0; i < ARRAY_SIZE(uri_fragment_tests); ++i) {
8851  HRESULT hr;
8852  IUri *uri = NULL;
8853  LPWSTR uriW, fragW;
8855 
8856  uriW = a2w(test.uri);
8857  fragW = a2w(test.fragment);
8858 
8859  hr = pCreateUriWithFragment(uriW, fragW, test.create_flags, 0, &uri);
8860  todo_wine_if(test.expected_todo)
8861  ok(hr == test.create_expected,
8862  "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n",
8863  hr, test.create_expected, i);
8864 
8865  if(SUCCEEDED(hr)) {
8866  BSTR received = NULL;
8867 
8868  hr = IUri_GetAbsoluteUri(uri, &received);
8869  todo_wine_if(test.expected_todo) {
8870  ok(hr == S_OK, "Error: GetAbsoluteUri returned 0x%08x, expected 0x%08x on uri_fragment_tests[%d].\n",
8871  hr, S_OK, i);
8872  ok(!strcmp_aw(test.expected_uri, received), "Error: Expected %s but got %s on uri_fragment_tests[%d].\n",
8873  test.expected_uri, wine_dbgstr_w(received), i);
8874  }
8875 
8877  }
8878 
8879  if(uri) IUri_Release(uri);
8880  heap_free(uriW);
8881  heap_free(fragW);
8882  }
8883 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
r received
Definition: btrfs.c:2939
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define test
Definition: rosglue.h:37
OLECHAR * BSTR
Definition: compat.h:1943
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define todo_wine_if(is_todo)
Definition: test.h:163
static const uri_with_fragment uri_fragment_tests[]
Definition: uri.c:5285
#define d
Definition: ke_i.h:81
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL Error
Definition: chkdsk.c:66
HRESULT WINAPI CreateUriWithFragment(LPCWSTR pwzURI, LPCWSTR pwzFragment, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5795
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL expected
Definition: store.c:2063
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

Referenced by START_TEST().

◆ test_CreateUriWithFragment_InvalidArgs()

static void test_CreateUriWithFragment_InvalidArgs ( void  )
static

Definition at line 8813 of file uri.c.

8813  {
8814  HRESULT hr;
8815  IUri *uri = (void*) 0xdeadbeef;
8816  const WCHAR fragmentW[] = {'#','f','r','a','g','m','e','n','t',0};
8817 
8818  hr = pCreateUriWithFragment(NULL, fragmentW, 0, 0, &uri);
8819  ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8820  ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
8821 
8822  hr = pCreateUriWithFragment(http_urlW, fragmentW, 0, 0, NULL);
8823  ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8824 
8825  /* Original URI can't already contain a fragment component. */
8826  uri = (void*) 0xdeadbeef;
8827  hr = pCreateUriWithFragment(http_url_fragW, fragmentW, 0, 0, &uri);
8828  ok(hr == E_INVALIDARG, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8829  ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
8830 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR http_url_fragW[]
Definition: uri.c:84
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR http_urlW[]
Definition: uri.c:82
#define ok(value,...)
Definition: atltest.h:57

Referenced by START_TEST().

◆ test_CreateUriWithFragment_InvalidFlags()

static void test_CreateUriWithFragment_InvalidFlags ( void  )
static

Definition at line 8833 of file uri.c.

8833  {
8834  DWORD i;
8835 
8836  for(i = 0; i < ARRAY_SIZE(invalid_flag_tests); ++i) {
8837  HRESULT hr;
8838  IUri *uri = (void*) 0xdeadbeef;
8839 
8840  hr = pCreateUriWithFragment(http_urlW, NULL, invalid_flag_tests[i].flags, 0, &uri);
8841  ok(hr == invalid_flag_tests[i].expected, "Error: CreateUriWithFragment returned 0x%08x, expected 0x%08x. flags=0x%08x.\n",
8843  ok(uri == NULL, "Error: Expected uri to be NULL, but was %p instead.\n", uri);
8844  }
8845 }
HRESULT hr
Definition: shlfolder.c:183
const char * uri
Definition: sec_mgr.c:1588
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static const uri_create_flag_test invalid_flag_tests[]
Definition: uri.c:105
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
static const WCHAR http_urlW[]
Definition: uri.c:82
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
BOOL expected
Definition: store.c:2063

Referenced by START_TEST().

◆ test_CreateURLMoniker()

static void test_CreateURLMoniker ( void  )
static

Definition at line 11237 of file uri.c.

11238 {
11239  const create_urlmon_test_t *test;
11240  IMoniker *mon, *base_mon;
11241  WCHAR *url, *base_url;
11242  IUri *uri, *base_uri;
11243  HRESULT hres;
11244 
11246  url = a2w(test->url);
11247  base_url = a2w(test->base_url);
11248 
11249  if(base_url) {
11250  hres = pCreateUri(base_url, test->base_uri_flags, 0, &base_uri);
11251  ok(hres == S_OK, "CreateUri failed: %08x\n", hres);
11252 
11253  hres = pCreateURLMonikerEx2(NULL, base_uri, &base_mon, URL_MK_NO_CANONICALIZE);
11254  ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres);
11255  }else {
11256  base_uri = NULL;
11257  base_mon = NULL;
11258  }
11259 
11260  hres = CreateURLMoniker(base_mon, url, &mon);
11261  ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
11262  test_urlmon_display_name(mon, test->legacy_url);
11263  test_display_uri(mon, test->legacy_url);
11264  IMoniker_Release(mon);
11265 
11266  hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_LEGACY);
11267  ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
11268  test_urlmon_display_name(mon, test->legacy_url);
11269  test_display_uri(mon, test->legacy_url);
11270  IMoniker_Release(mon);
11271 
11272  hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_UNIFORM);
11273  ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
11274  test_urlmon_display_name(mon, test->uniform_url);
11275  test_display_uri(mon, test->uniform_url);
11276  IMoniker_Release(mon);
11277 
11278  hres = pCreateURLMonikerEx(base_mon, url, &mon, URL_MK_NO_CANONICALIZE);
11279  ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
11280  test_urlmon_display_name(mon, test->no_canon_url);
11281  test_display_uri(mon, test->no_canon_url);
11282  IMoniker_Release(mon);
11283 
11284  hres = pCreateUri(url, test->uri_flags, 0, &uri);
11285  ok(hres == S_OK, "CreateUri failed: %08x\n", hres);
11286 
11287  hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_LEGACY);
11288  ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres);
11289  test_urlmon_display_name(mon, base_url ? test->legacy_url : test->uri_url);
11290  test_display_uri(mon, base_url ? test->legacy_url : test->uri_url);
11291  IMoniker_Release(mon);
11292 
11293  hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_UNIFORM);
11294  ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres);
11295  test_urlmon_display_name(mon, base_url ? test->uniform_url : test->uri_url);
11296  test_display_uri(mon, base_url ? test->uniform_url : test->uri_url);
11297  IMoniker_Release(mon);
11298 
11299  hres = pCreateURLMonikerEx2(base_mon, uri, &mon, URL_MK_NO_CANONICALIZE);
11300  ok(hres == S_OK, "CreateURLMonikerEx2 failed: %08x\n", hres);
11301  test_urlmon_display_name(mon, base_url ? test->no_canon_url : test->uri_url);
11302  test_display_uri(mon, base_url ? test->no_canon_url : test->uri_url);
11303  IMoniker_Release(mon);
11304 
11305  IUri_Release(uri);
11306  heap_free(url);
11308  if(base_uri)
11309  IUri_Release(base_uri);
11310  if(base_mon)
11311  IMoniker_Release(base_mon);
11312  }
11313 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
const char * uri
Definition: sec_mgr.c:1588
static const create_urlmon_test_t create_urlmon_tests[]
Definition: uri.c:11125
#define test
Definition: rosglue.h:37
#define test_urlmon_display_name(a, b)
Definition: uri.c:11198
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
static const WCHAR url[]
Definition: encode.c:1432
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
const char * base_url
Definition: mimeole.c:1466
#define test_display_uri(a, b)
Definition: uri.c:11212
HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **ppmk)
Definition: umon.c:732
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by START_TEST().

◆ test_IPersistStream()

static void test_IPersistStream ( void  )
static

Definition at line 11330 of file uri.c.

11331 {
11332  int i, props_order[Uri_PROPERTY_DWORD_LAST+1] = { 0 };
11333 
11334  props_order[Uri_PROPERTY_RAW_URI] = 1;
11335  props_order[Uri_PROPERTY_FRAGMENT] = 2;
11336  props_order[Uri_PROPERTY_HOST] = 3;
11337  props_order[Uri_PROPERTY_PASSWORD] = 4;
11338  props_order[Uri_PROPERTY_PATH] = 5;
11339  props_order[Uri_PROPERTY_PORT] = 6;
11340  props_order[Uri_PROPERTY_QUERY] = 7;
11341  props_order[Uri_PROPERTY_SCHEME_NAME] = 8;
11342  props_order[Uri_PROPERTY_USER_NAME] = 9;
11343 
11344  for(i = 0; i < ARRAY_SIZE(uri_tests); i++) {
11345  const uri_properties *test = uri_tests+i;
11346  LPWSTR uriW;
11347  IUri *uri;
11348  IPersistStream *persist_stream;
11349  IStream *stream;
11350  IMarshal *marshal;
11351  DWORD props, props_no, dw_data[6];
11352  WCHAR str_data[1024];
11354  LARGE_INTEGER no_off;
11355  CLSID curi;
11356  BSTR raw_uri;
11357  HRESULT hr;
11358 
11359  if(test->create_todo || test->create_expected!=S_OK)
11360  continue;
11361 
11362  uriW = a2w(test->uri);
11363  hr = pCreateUri(uriW, test->create_flags, 0, &uri);
11364  ok(hr == S_OK, "%d) CreateUri failed 0x%08x, expected S_OK..\n", i, hr);
11365 
11366  hr = IUri_QueryInterface(uri, &IID_IPersistStream, (void**)&persist_stream);
11367  ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr);
11368 
11370  ok(hr == S_OK, "CreateStreamOnHGlobal failed 0x%08x.\n", hr);
11371  hr = IPersistStream_IsDirty(persist_stream);
11372  ok(hr == S_FALSE, "%d) IsDirty returned 0x%08x, expected S_FALSE.\n", i, hr);
11373  hr = IPersistStream_Save(persist_stream, stream, FALSE);
11374  ok(hr == S_OK, "%d) Save failed 0x%08x, expected S_OK.\n", i, hr);
11375  hr = IPersistStream_IsDirty(persist_stream);
11376  ok(hr == S_FALSE, "%d) IsDirty returned 0x%08x, expected S_FALSE.\n", i, hr);
11377  no_off.QuadPart = 0;
11378  hr = IStream_Seek(stream, no_off, STREAM_SEEK_CUR, &size);
11379  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11380  hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
11381  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11382  hr = IPersistStream_GetSizeMax(persist_stream, &max_size);
11383  ok(hr == S_OK, "%d) GetSizeMax failed 0x%08x, expected S_OK.\n", i, hr);
11384  ok(U(size).LowPart+2 == U(max_size).LowPart,
11385  "%d) Written data size is %d, max_size %d.\n",
11386  i, U(size).LowPart, U(max_size).LowPart);
11387 
11388  hr = IStream_Read(stream, (void*)dw_data, sizeof(DWORD), NULL);
11389  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11390  ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %d, expected %d\n",
11391  i, dw_data[0]-2, U(size).LowPart);
11392  hr = IStream_Read(stream, (void*)dw_data, 6*sizeof(DWORD), NULL);
11393  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11394  ok(dw_data[0] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[0]);
11395  ok(dw_data[1] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[1]);
11396  ok(dw_data[2] == add_default_flags(test->create_flags),
11397  "%d) Incorrect value %x, expected %x (creation flags).\n",
11398  i, dw_data[2], add_default_flags(test->create_flags));
11399  ok(dw_data[3] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[3]);
11400  ok(dw_data[4] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[4]);
11401  ok(dw_data[5] == 0, "%d) Incorrect value %x, expected 0 (unknown).\n", i, dw_data[5]);
11402 
11403  props_no = 0;
11404  for(props=0; props<=Uri_PROPERTY_DWORD_LAST; props++) {
11405  if(!props_order[props])
11406  continue;
11407 
11408  if(props <= Uri_PROPERTY_STRING_LAST) {
11409  if(test->str_props[props].expected == S_OK)
11410  props_no++;
11411  } else {
11412  if(test->dword_props[props-Uri_PROPERTY_DWORD_START].expected == S_OK)
11413  props_no++;
11414  }
11415  }
11416  if(test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value != URL_SCHEME_HTTP
11417  && test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value != URL_SCHEME_FTP
11418  && test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value != URL_SCHEME_HTTPS)
11419  props_no = 1;
11420 
11421  hr = IStream_Read(stream, (void*)&props, sizeof(DWORD), NULL);
11422  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11423  ok(props == props_no, "%d) Properties no is %d, expected %d.\n", i, props, props_no);
11424 
11425  dw_data[2] = 0;
11426  dw_data[3] = -1;
11427  while(props) {
11428  hr = IStream_Read(stream, (void*)dw_data, 2*sizeof(DWORD), NULL);
11429  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11430  props--;
11431  ok(dw_data[2]<props_order[dw_data[0]],
11432  "%d) Incorrect properties order (%d, %d)\n",
11433  i, dw_data[0], dw_data[3]);
11434  dw_data[2] = props_order[dw_data[0]];
11435  dw_data[3] = dw_data[0];
11436 
11437  if(dw_data[0]<=Uri_PROPERTY_STRING_LAST) {
11438  const uri_str_property *prop = test->str_props+dw_data[0];
11439  hr = IStream_Read(stream, (void*)str_data, dw_data[1], NULL);
11440  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11441  ok(!strcmp_aw(prop->value, str_data) || broken(prop->broken_value && !strcmp_aw(prop->broken_value, str_data)),
11442  "%d) Expected %s but got %s (%d).\n", i, prop->value, wine_dbgstr_w(str_data), dw_data[0]);
11443  } else if(dw_data[0]>=Uri_PROPERTY_DWORD_START && dw_data[0]<=Uri_PROPERTY_DWORD_LAST) {
11444  const uri_dword_property *prop = test->dword_props+dw_data[0]-Uri_PROPERTY_DWORD_START;
11445  ok(dw_data[1] == sizeof(DWORD), "%d) Size of dword property is %d (%d)\n", i, dw_data[1], dw_data[0]);
11446  hr = IStream_Read(stream, (void*)&dw_data[1], sizeof(DWORD), NULL);
11447  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11448  ok(prop->value == dw_data[1], "%d) Expected %d but got %d (%d).\n", i, prop->value, dw_data[1], dw_data[0]);
11449  } else {
11450  ok(FALSE, "%d) Incorrect property type (%d)\n", i, dw_data[0]);
11451  break;
11452  }
11453  }
11454  ok(props == 0, "%d) Not all properties were processed %d. Next property type: %d\n",
11455  i, props, dw_data[0]);
11456 
11457  IUri_Release(uri);
11458 
11459  hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
11460  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11461  hr = IPersistStream_GetClassID(persist_stream, &curi);
11462  ok(hr == S_OK, "%d) GetClassID failed 0x%08x, expected S_OK.\n", i, hr);
11463  ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetClassID returned incorrect CLSID.\n", i);
11464  IPersistStream_Release(persist_stream);
11465 
11466  hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
11467  &IID_IUri, (void**)&uri);
11468  ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr);
11469  hr = IUri_QueryInterface(uri, &IID_IPersistStream, (void**)&persist_stream);
11470  ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr);
11471  hr = IPersistStream_Load(persist_stream, stream);
11472  ok(hr == S_OK, "%d) Load failed 0x%08x, expected S_OK.\n", i, hr);
11473  hr = IUri_GetRawUri(uri, &raw_uri);
11474  ok(hr == S_OK, "%d) GetRawUri failed 0x%08x, expected S_OK.\n", i, hr);
11475  ok(!strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].value, raw_uri)
11476  || broken(test->str_props[Uri_PROPERTY_RAW_URI].broken_value
11477  && !strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].broken_value, raw_uri)),
11478  "%d) Expected %s but got %s.\n", i, test->str_props[Uri_PROPERTY_RAW_URI].value,
11479  wine_dbgstr_w(raw_uri));
11480  SysFreeString(raw_uri);
11481  IPersistStream_Release(persist_stream);
11482 
11483  hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal);
11484  ok(hr == S_OK, "%d) QueryInterface(IID_IMarshal) failed 0x%08x, expected S_OK.\n", i, hr);
11485  hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
11486  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11487  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11488  MSHCTX_DIFFERENTMACHINE, NULL, MSHLFLAGS_NORMAL);
11489  ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11490  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11491  MSHCTX_CROSSCTX, NULL, MSHLFLAGS_NORMAL);
11492  ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11493  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11494  MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLESTRONG);
11495  ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11496  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11497  MSHCTX_LOCAL, NULL, MSHLFLAGS_TABLEWEAK);
11498  ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11499  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11500  MSHCTX_LOCAL, NULL, MSHLFLAGS_NOPING);
11501  ok(hr == E_INVALIDARG, "%d) MarshalInterface returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11502  hr = IMarshal_MarshalInterface(marshal, stream, &IID_IUri, (void*)uri,
11503  MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
11504  ok(hr == S_OK, "%d) MarshalInterface failed 0x%08x, expected S_OK.\n", i, hr);
11505  hr = IMarshal_GetUnmarshalClass(marshal, &IID_IUri, (void*)uri,
11506  MSHCTX_CROSSCTX, NULL, MSHLFLAGS_NORMAL, &curi);
11507  ok(hr == E_INVALIDARG, "%d) GetUnmarshalClass returned 0x%08x, expected E_INVALIDARG.\n", i, hr);
11508  hr = IMarshal_GetUnmarshalClass(marshal, &IID_IUri, (void*)uri,
11509  MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL, &curi);
11510  ok(hr == S_OK, "%d) GetUnmarshalClass failed 0x%08x, expected S_OK.\n", i, hr);
11511  ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetUnmarshalClass returned incorrect CLSID.\n", i);
11512 
11513  hr = IStream_Seek(stream, no_off, STREAM_SEEK_CUR, &size);
11514  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11515  hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
11516  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11517  hr = IStream_Read(stream, (void*)dw_data, 3*sizeof(DWORD), NULL);
11518  ok(hr == S_OK, "%d) Read failed 0x%08x, expected S_OK.\n", i, hr);
11519  ok(dw_data[0]-2 == U(size).LowPart, "%d) Structure size is %d, expected %d\n",
11520  i, dw_data[0]-2, U(size).LowPart);
11521  ok(dw_data[1] == MSHCTX_LOCAL, "%d) Incorrect value %d, expected MSHCTX_LOCAL.\n",
11522  i, dw_data[1]);
11523  ok(dw_data[2] == dw_data[0]-8, "%d) Incorrect value %d, expected %d (PersistStream size).\n",
11524  i, dw_data[2], dw_data[0]-8);
11525  if(!test->str_props[Uri_PROPERTY_PATH].value[0] &&
11526  (test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_HTTP
11527  || test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_FTP
11528  || test->dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START].value == URL_SCHEME_HTTPS))
11529  U(max_size).LowPart += 3*sizeof(DWORD);
11530  ok(dw_data[2] == U(max_size).LowPart, "%d) Incorrect value %d, expected %d (PersistStream size).\n",
11531  i, dw_data[2], U(max_size).LowPart);
11532  IMarshal_Release(marshal);
11533  IUri_Release(uri);
11534 
11535  hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
11536  ok(hr == S_OK, "%d) Seek failed 0x%08x, expected S_OK.\n", i, hr);
11537  hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
11538  &IID_IUri, (void**)&uri);
11539  ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr);
11540  hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal);
11541  ok(hr == S_OK, "%d) QueryInterface failed 0x%08x, expected S_OK.\n", i, hr);
11542  IUri_Release(uri);
11543  hr = IMarshal_UnmarshalInterface(marshal, stream, &IID_IUri, (void**)&uri);
11544  ok(hr == S_OK, "%d) UnmarshalInterface failed 0x%08x, expected S_OK.\n", i, hr);
11545  hr = IUri_GetRawUri(uri, &raw_uri);
11546  ok(hr == S_OK, "%d) GetRawUri failed 0x%08x, expected S_OK.\n", i, hr);
11547  ok(!strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].value, raw_uri)
11548  || broken(test->str_props[Uri_PROPERTY_RAW_URI].broken_value
11549  && !strcmp_aw(test->str_props[Uri_PROPERTY_RAW_URI].broken_value, raw_uri)),
11550  "%d) Expected %s but got %s.\n", i, test->str_props[Uri_PROPERTY_RAW_URI].value,
11551  wine_dbgstr_w(raw_uri));
11552  SysFreeString(raw_uri);
11553 
11554  IMarshal_Release(marshal);
11555  IStream_Release(stream);
11556  IUri_Release(uri);
11557  heap_free(uriW);
11558  }
11559 }
const char * broken_value
Definition: uri.c:118
#define TRUE
Definition: types.h:120
const char * value
Definition: uri.c:115
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
static DWORD
Definition: uri.c:72
static const uri_properties uri_tests[]
Definition: uri.c:140
const char * uri
Definition: sec_mgr.c:1588
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
#define U(x)
Definition: wordpad.c:45
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define test
Definition: rosglue.h:37
OLECHAR * BSTR
Definition: compat.h:1943
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static INT max_size
Definition: history.c:51
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
static int add_default_flags(DWORD flags)
Definition: uri.c:11315
smooth NULL
Definition: ftsmooth.c:416
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
const GUID IID_IPersistStream
Definition: proxy.cpp:13
Definition: parse.h:22
GLuint GLuint stream
Definition: glext.h:7522
char * value
Definition: compiler.c:67
#define broken(x)
Definition: _sntprintf.h:21
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
static const WCHAR props[]
Definition: wbemdisp.c:288
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
LONGLONG QuadPart
Definition: typedefs.h:113
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static DWORD strcmp_aw(LPCSTR strA, LPCWSTR strB)
Definition: uri.c:7700

Referenced by START_TEST().

◆ test_IUri_GetDwordProperties()

static void test_IUri_GetDwordProperties ( void  )
static

Definition at line 8237 of file uri.c.

8237  {
8238  IUri *uri = NULL;
8239  HRESULT hr;
8240  DWORD i;
8241 
8242  /* Make sure all the 'Get*' dword property functions handle invalid args correctly. */
8243  hr = pCreateUri(http_urlW, 0, 0, &uri);
8244  ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
8245  if(SUCCEEDED(hr)) {
8246  hr = IUri_GetHostType(uri, NULL);
8247  ok(hr == E_INVALIDARG, "Error: GetHostType returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8248 
8249  hr = IUri_GetPort(uri, NULL);
8250  ok(hr == E_INVALIDARG, "Error: GetPort returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8251 
8252  hr = IUri_GetScheme(uri, NULL);
8253  ok(hr == E_INVALIDARG, "Error: GetScheme returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8254 
8255  hr = IUri_GetZone(uri, NULL);
8256  ok(hr == E_INVALIDARG, "Error: GetZone returned 0x%08x, expected 0x%08x.\n", hr, E_INVALIDARG);
8257  }
8258  if(uri) IUri_Release(uri);
8259 
8260  for(i = 0; i < ARRAY_SIZE(uri_tests); ++i) {
8262  LPWSTR uriW;
8263  uri = NULL;
8264 
8265  uriW = a2w(test.uri);
8266  hr = pCreateUri(uriW, test.create_flags, 0, &uri);
8267  todo_wine_if(test.create_todo)
8268  ok(hr == test.create_expected, "Error: CreateUri returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
8269  hr, test.create_expected, i);
8270 
8271  if(SUCCEEDED(hr)) {
8272  uri_dword_property prop;
8273  DWORD received;
8274 
8275  /* Assign an insane value so tests don't accidentally pass when
8276  * they shouldn't!
8277  */
8278  received = -9999999;
8279 
8280  /* GetHostType() tests. */
8281  prop = test.dword_props[Uri_PROPERTY_HOST_TYPE-Uri_PROPERTY_DWORD_START];
8282  hr = IUri_GetHostType(uri, &received);
8283  todo_wine_if(prop.todo) {
8284  ok(hr == prop.expected, "Error: GetHostType returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
8285  hr, prop.expected, i);
8286  ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i);
8287  }
8288  received = -9999999;
8289 
8290  /* GetPort() tests. */
8291  prop = test.dword_props[Uri_PROPERTY_PORT-Uri_PROPERTY_DWORD_START];
8292  hr = IUri_GetPort(uri, &received);
8293  todo_wine_if(prop.todo) {
8294  ok(hr == prop.expected, "Error: GetPort returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
8295  hr, prop.expected, i);
8296  ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i);
8297  }
8298  received = -9999999;
8299 
8300  /* GetScheme() tests. */
8301  prop = test.dword_props[Uri_PROPERTY_SCHEME-Uri_PROPERTY_DWORD_START];
8302  hr = IUri_GetScheme(uri, &received);
8303  todo_wine_if(prop.todo) {
8304  ok(hr == prop.expected, "Error: GetScheme returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
8305  hr, prop.expected, i);
8306  ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i);
8307  }
8308  received = -9999999;
8309 
8310  /* GetZone() tests. */
8311  prop = test.dword_props[Uri_PROPERTY_ZONE-Uri_PROPERTY_DWORD_START];
8312  hr = IUri_GetZone(uri, &received);
8313  todo_wine_if(prop.todo) {
8314  ok(hr == prop.expected, "Error: GetZone returned 0x%08x, expected 0x%08x on uri_tests[%d].\n",
8315  hr, prop.expected, i);
8316  ok(received == prop.value, "Error: Expected %d but got %d on uri_tests[%d].\n", prop.value, received, i);
8317  }
8318  }
8319 
8320  if(uri) IUri_Release(uri);
8321 
8322  heap_free(uriW);
8323  }
8324 }
static LPWSTR a2w(LPCSTR str)
Definition: uri.c:7688
HRESULT hr
Definition: shlfolder.c:183
static const uri_properties uri_tests[]
Definition: uri.c:140
const char * uri
Definition: sec_mgr.c:1588
r received
Definition: btrfs.c:2939
GLdouble n
Definition: glext.h:7729
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define test
Definition: rosglue.h:37
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define todo_wine_if(is_todo)
Definition: test.h:163
#define d
Definition: ke_i.h:81
if(!(yy_init))
Definition: macro.lex.yy.c:714
LONG HRESULT
Definition: typedefs.h:78
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL Error
Definition: chkdsk.c:66
static const WCHAR http_urlW[]
Definition: uri.c:82
HRESULT expected
Definition: uri.c:125
#define S_OK
Definition: intsafe.h:59
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI)
Definition: uri.c:5700
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL expected
Definition: store.c:2063
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BOOL heap_free(void *mem)
Definition: appwiz.h:75

Referenced by START_TEST().

◆ test_IUri_GetProperties()

static void test_IUri_GetProperties ( void  )
static

Definition at line 8417 of file uri.c.

8417  {
8418  IUri *uri = NULL;
8419  HRESULT hr;
8420  DWORD i;
8421 
8422  hr = pCreateUri(http_urlW, 0, 0, &uri);
8423  ok(hr == S_OK, "Error: CreateUri returned 0x%08x, expected 0x%08x.\n", hr,