* Sync with Wine 1.7.17.
CORE-8080
svn path=/trunk/; revision=62930
#include <wine/test.h>
//#include <stdarg.h>
//#include <stddef.h>
+#include <stdio.h>
//#include "windef.h"
//#include "winbase.h"
* call hasn't already been made for the specified Feature). Because of
* this we skip these tests on IE 7 and earlier.
*/
+static const char* szFeatureControlKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl";
+
static void test_internet_features_registry(void) {
HRESULT hres;
DWORD res;
char *name;
HKEY feature_control;
HKEY feature;
- DWORD value, skip_zone;
+ DWORD value;
+ BOOL skip_zone;
BOOL delete_feature_key = TRUE;
- BOOL delete_feature_control_key = FALSE;
- static const char* szFeatureControlKey = "Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl";
static const char* szFeatureBehaviorsKey = "FEATURE_BEHAVIORS";
static const char* szFeatureZoneElevationKey = "FEATURE_ZONE_ELEVATION";
/* Some Windows machines don't have a FeatureControl key in HKCU. */
res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control);
- if(res != ERROR_SUCCESS) {
- res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &feature_control);
- ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res);
- delete_feature_control_key = TRUE;
- }
+ ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res);
res = RegOpenKeyA(feature_control, szFeatureBehaviorsKey, &feature);
- if(res == ERROR_SUCCESS)
+ if(res == ERROR_SUCCESS) {
/* FEATURE_BEHAVIORS already existed, so don't delete it when we're done. */
delete_feature_key = FALSE;
- else {
+ }else {
res = RegCreateKeyA(feature_control, szFeatureBehaviorsKey, &feature);
ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res);
}
RegCloseKey(feature);
RegDeleteKeyA(feature_control, szFeatureBehaviorsKey);
} else {
- RegDeleteValue(feature, name);
+ RegDeleteValueA(feature, name);
RegCloseKey(feature);
}
ok(hres == S_OK, "CoInternetSetFeatureEnabled failed: %08x\n", hres);
RegCloseKey(feature_control);
- if(delete_feature_control_key)
- RegDeleteKeyA(HKEY_CURRENT_USER, szFeatureControlKey);
res = RegOpenKeyA(HKEY_LOCAL_MACHINE, szFeatureControlKey, &feature_control);
ok(res == ERROR_SUCCESS, "RegOpenKey failed: %d\n", res);
if (res == ERROR_ACCESS_DENIED)
{
skip("Not allowed to modify zone elevation\n");
- skip_zone = 1;
+ skip_zone = TRUE;
}
else
{
- skip_zone = 0;
+ skip_zone = FALSE;
ok(res == ERROR_SUCCESS, "RegSetValueEx failed: %d\n", res);
hres = pCoInternetIsFeatureEnabled(FEATURE_ZONE_ELEVATION, GET_FEATURE_FROM_PROCESS);
}
static void test_internet_features(void) {
+ HKEY key;
+ DWORD res;
+
if(!pCoInternetIsFeatureEnabled || !pCoInternetSetFeatureEnabled) {
win_skip("Skipping internet feature tests, IE is too old\n");
return;
}
+ /* IE10 takes FeatureControl key into account only if it's available upon process start. */
+ res = RegOpenKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &key);
+ if(res != ERROR_SUCCESS) {
+ PROCESS_INFORMATION pi;
+ STARTUPINFOA si = { 0 };
+ char cmdline[MAX_PATH];
+ char **argv;
+ BOOL ret;
+
+ res = RegCreateKeyA(HKEY_CURRENT_USER, szFeatureControlKey, &key);
+ ok(res == ERROR_SUCCESS, "RegCreateKey failed: %d\n", res);
+
+ trace("Running features tests in a separated process.\n");
+
+ winetest_get_mainargs( &argv );
+ sprintf(cmdline, "\"%s\" %s internet_features", argv[0], argv[1]);
+ ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+ ok(ret, "Could not create process: %u\n", GetLastError());
+ winetest_wait_child_process( pi.hProcess );
+ CloseHandle(pi.hThread);
+ CloseHandle(pi.hProcess);
+
+ RegDeleteKeyA(HKEY_CURRENT_USER, szFeatureControlKey);
+ return;
+ }
+
test_internet_features_registry();
test_CoInternetIsFeatureEnabled();
test_CoInternetSetFeatureEnabled();
START_TEST(misc)
{
HMODULE hurlmon;
+ int argc;
+ char **argv;
+
+ argc = winetest_get_mainargs(&argv);
- hurlmon = GetModuleHandle("urlmon.dll");
+ hurlmon = GetModuleHandleA("urlmon.dll");
pCoInternetCompareUrl = (void *) GetProcAddress(hurlmon, "CoInternetCompareUrl");
pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl");
pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession");
OleInitialize(NULL);
- register_protocols();
-
- test_CreateFormatEnum();
- test_RegisterFormatEnumerator();
- test_CoInternetParseUrl();
- test_CoInternetCompareUrl();
- test_CoInternetQueryInfo();
- test_FindMimeFromData();
- test_NameSpace();
- test_MimeFilter();
- test_ReleaseBindInfo();
- test_CopyStgMedium();
- test_CopyBindInfo();
- test_UrlMkGetSessionOption();
- test_user_agent();
- test_MkParseDisplayNameEx();
- test_IsValidURL();
+ if(argc <= 2 || strcmp(argv[2], "internet_features")) {
+ register_protocols();
+
+ test_CreateFormatEnum();
+ test_RegisterFormatEnumerator();
+ test_CoInternetParseUrl();
+ test_CoInternetCompareUrl();
+ test_CoInternetQueryInfo();
+ test_FindMimeFromData();
+ test_NameSpace();
+ test_MimeFilter();
+ test_ReleaseBindInfo();
+ test_CopyStgMedium();
+ test_CopyBindInfo();
+ test_UrlMkGetSessionOption();
+ test_user_agent();
+ test_MkParseDisplayNameEx();
+ test_IsValidURL();
+ }
+
test_internet_features();
OleUninitialize();
DEFINE_EXPECT(GetBindString_USER_AGENT);
DEFINE_EXPECT(GetBindString_POST_COOKIE);
DEFINE_EXPECT(GetBindString_URL);
+DEFINE_EXPECT(GetBindString_ROOTDOC_URL);
DEFINE_EXPECT(QueryService_HttpNegotiate);
DEFINE_EXPECT(QueryService_InternetProtocol);
DEFINE_EXPECT(QueryService_HttpSecurity);
static const CHAR post_data[] = "mode=Test";
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- sprintf(buf, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
-}
-
static int strcmp_wa(LPCWSTR strw, const char *stra)
{
CHAR buf[512];
return IHttpSecurity_QueryInterface(&http_security, riid, ppv);
}
- ok(0, "unexpected service %s\n", debugstr_guid(guidService));
+ if(IsEqualGUID(&IID_IGetBindHandle, guidService)) {
+ trace("QueryService(IID_IGetBindHandle)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ if(IsEqualGUID(&IID_IWindowForBindingUI, guidService)) {
+ trace("QueryService(IID_IWindowForBindingUI)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
return E_FAIL;
}
static HRESULT WINAPI Stream_QueryInterface(IStream *iface, REFIID riid, void **ppv)
{
- ok(0, "unexpected call\n");
+ static const IID IID_strm_unknown = {0x2f68429a,0x199a,0x4043,{0x93,0x11,0xf2,0xfe,0x7c,0x13,0xcc,0xb9}};
+
+ if(!IsEqualGUID(&IID_strm_unknown, riid)) /* IE11 */
+ ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid));
+
+ *ppv = NULL;
return E_NOINTERFACE;
}
{
HRESULT hres;
+ trace("continue in state %d\n", state);
+
if(state == STATE_CONNECTING) {
if(tested_protocol == HTTP_TEST || tested_protocol == HTTPS_TEST || tested_protocol == FTP_TEST) {
if (http_is_first){
CHECK_EXPECT(ReportProgress_DECODING);
ok(!lstrcmpW(szStatusText, pjpegW), "szStatusText = %s\n", wine_dbgstr_w(szStatusText));
break;
+ case BINDSTATUS_RESERVED_7:
+ trace("BINDSTATUS_RESERVED_7\n");
+ break;
default:
- ok(0, "Unexpected status %d\n", ulStatusCode);
+ ok(0, "Unexpected status %d (%d)\n", ulStatusCode, ulStatusCode-BINDSTATUS_LAST);
};
return S_OK;
static HRESULT QueryInterface(REFIID riid, void **ppv)
{
static const IID IID_undocumented = {0x58DFC7D0,0x5381,0x43E5,{0x9D,0x72,0x4C,0xDD,0xE4,0xCB,0x0F,0x1A}};
+ static const IID IID_undocumentedIE10 = {0xc28722e5,0xbc1a,0x4c55,{0xa6,0x8d,0x33,0x21,0x9f,0x69,0x89,0x10}};
*ppv = NULL;
/* NOTE: IE8 queries for undocumented {58DFC7D0-5381-43E5-9D72-4CDDE4CB0F1A} interface. */
if(IsEqualGUID(&IID_undocumented, riid))
return E_NOINTERFACE;
+ /* NOTE: IE10 queries for undocumented {c28722e5-bc1a-4c55-a68d-33219f698910} interface. */
+ if(IsEqualGUID(&IID_undocumentedIE10, riid))
+ return E_NOINTERFACE;
if(*ppv)
return S_OK;
- ok(0, "unexpected call %s\n", debugstr_guid(riid));
+ ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
memcpy(*ppwzStr, binding_urls[tested_protocol], size);
return S_OK;
}
+ case BINDSTRING_ROOTDOC_URL:
+ CHECK_EXPECT(GetBindString_ROOTDOC_URL);
+ ok(cEl == 1, "cEl=%d, expected 1\n", cEl);
+ return E_NOTIMPL;
default:
- ok(0, "unexpected call\n");
+ ok(0, "unexpected ulStringType %d\n", ulStringType);
}
return E_NOTIMPL;
}
if(!IsEqualGUID(riid, &unknown_iid)) /* IE10 */
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
case 1: {
IServiceProvider *service_provider;
IHttpNegotiate *http_negotiate;
- static WCHAR header[] = {'?',0};
+ static const WCHAR header[] = {'?',0};
hres = IInternetProtocolSink_QueryInterface(binding_sink, &IID_IServiceProvider,
(void**)&service_provider);
return S_OK;
}
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
*ppv = NULL;
return E_NOINTERFACE;
}
CHECK_EXPECT(CreateInstance);
ok(pOuter == (IUnknown*)prot_bind_info, "pOuter != protocol_unk\n");
- ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
ok(ppv != NULL, "ppv == NULL\n");
*ppv = &Protocol;
CHECK_EXPECT(MimeFilter_CreateInstance);
ok(!outer, "outer = %p\n", outer);
- ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IInternetProtocol, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
*ppv = &MimeProtocol;
return S_OK;
SET_EXPECT(ReportProgress_DIRECTBIND);
if(!got_user_agent)
SET_EXPECT(GetBindString_USER_AGENT);
+ SET_EXPECT(GetBindString_ROOTDOC_URL);
SET_EXPECT(GetBindString_ACCEPT_MIMES);
SET_EXPECT(QueryService_HttpNegotiate);
SET_EXPECT(BeginningTransaction);
CHECK_CALLED(GetBindString_USER_AGENT);
got_user_agent = TRUE;
}
+ CLEAR_CALLED(GetBindString_ROOTDOC_URL); /* New in IE11 */
CHECK_CALLED(GetBindString_ACCEPT_MIMES);
CHECK_CALLED(QueryService_HttpNegotiate);
CHECK_CALLED(BeginningTransaction);
CHECK_CALLED(ReportResult);
hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0);
- ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres);
+ ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres);
break;
}
}else {
CLEAR_CALLED(ReportProgress_COOKIE_SENT);
hres = IInternetProtocol_Abort(async_protocol, E_ABORT, 0);
- ok(hres == INET_E_RESULT_DISPATCHED, "Abort failed: %08x\n", hres);
+ ok(hres == INET_E_RESULT_DISPATCHED || hres == S_OK /* IE10 */, "Abort failed: %08x\n", hres);
test_protocol_terminate(async_protocol);
static void test_https_protocol(void)
{
- static const WCHAR codeweavers_url[] =
- {'h','t','t','p','s',':','/','/','w','w','w','.','c','o','d','e','w','e','a','v','e','r','s',
- '.','c','o','m','/','t','e','s','t','.','h','t','m','l',0};
+ static const WCHAR https_winehq_url[] =
+ {'h','t','t','p','s',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g','/',
+ 't','e','s','t','s','/','h','e','l','l','o','.','h','t','m','l',0};
trace("Testing https protocol (from urlmon)...\n");
bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA | BINDF_FROMURLMON | BINDF_NOWRITECACHE;
- test_http_protocol_url(codeweavers_url, HTTPS_TEST, TEST_FIRST_HTTP, TYMED_NULL);
+ test_http_protocol_url(https_winehq_url, HTTPS_TEST, TEST_FIRST_HTTP, TYMED_NULL);
}
hres = CoGetClassObject(&CLSID_GopherProtocol, CLSCTX_INPROC_SERVER, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == S_OK ||
- hres == REGDB_E_CLASSNOTREG, /* Gopher protocol has been removed as of Vista */
+ broken(hres == REGDB_E_CLASSNOTREG || hres == CLASS_E_CLASSNOTAVAILABLE), /* Gopher protocol has been removed as of Vista */
"CoGetClassObject failed: %08x\n", hres);
if(FAILED(hres))
return;
CHECK_CALLED(QueryService_InternetProtocol);
CHECK_CALLED(CreateInstance);
CHECK_CALLED(ReportProgress_PROTOCOLCLASSID);
- CHECK_CALLED(SetPriority);
+ CLEAR_CALLED(SetPriority); /* IE11 does not call it. */
if(impl_protex)
CHECK_CALLED(StartEx);
else
return;
}
- hurlmon = GetModuleHandle("urlmon.dll");
+ hurlmon = GetModuleHandleA("urlmon.dll");
pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession");
pReleaseBindInfo = (void*) GetProcAddress(hurlmon, "ReleaseBindInfo");
pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri");
OleInitialize(NULL);
- event_complete = CreateEvent(NULL, FALSE, FALSE, NULL);
- event_complete2 = CreateEvent(NULL, FALSE, FALSE, NULL);
- event_continue = CreateEvent(NULL, FALSE, FALSE, NULL);
- event_continue_done = CreateEvent(NULL, FALSE, FALSE, NULL);
+ event_complete = CreateEventW(NULL, FALSE, FALSE, NULL);
+ event_complete2 = CreateEventW(NULL, FALSE, FALSE, NULL);
+ event_continue = CreateEventW(NULL, FALSE, FALSE, NULL);
+ event_continue_done = CreateEventW(NULL, FALSE, FALSE, NULL);
thread_id = GetCurrentThreadId();
test_file_protocol();
expect_ ## func = called_ ## func = FALSE; \
}while(0)
+#define SET_CALLED(func) \
+ do { \
+ expect_ ## func = called_ ## func = FALSE; \
+ }while(0)
+
DEFINE_EXPECT(ParseUrl_SECURITY_URL_input);
DEFINE_EXPECT(ParseUrl_SECURITY_URL_input2);
DEFINE_EXPECT(ParseUrl_SECURITY_URL_expected);
*/
res = RegOpenKeyA(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
- if(res != ERROR_SUCCESS) {
- ok(0, "Could not open zone key\n");
+ ok(res == ERROR_SUCCESS, "Could not open zone key\n");
+ if(res != ERROR_SUCCESS)
return;
- }
- wsprintf(buf, "%X", action);
+ wsprintfA(buf, "%X", action);
size = sizeof(DWORD);
res = RegQueryValueExA(hkey, buf, NULL, NULL, (BYTE*)®_policy, &size);
RegCloseKey(hkey);
+
+ /* Try settings from HKEY_LOCAL_MACHINE. */
+ if(res != ERROR_SUCCESS || size != sizeof(DWORD)) {
+ res = RegOpenKeyA(HKEY_LOCAL_MACHINE,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3", &hkey);
+ ok(res == ERROR_SUCCESS, "Could not open zone key\n");
+
+ size = sizeof(DWORD);
+ res = RegQueryValueExA(hkey, buf, NULL, NULL, (BYTE*)®_policy, &size);
+ RegCloseKey(hkey);
+ }
+
if(res != ERROR_SUCCESS || size != sizeof(DWORD)) {
policy = 0xdeadbeef;
hres = IInternetSecurityManager_ProcessUrlAction(secmgr, url9, action, (BYTE*)&policy,
static const zone_domain_mapping zone_domain_mappings[] = {
/* Implicitly means "*.yabadaba.do". */
{"yabadaba.do",NULL,"http",URLZONE_CUSTOM},
- /* The '*' doesn't count as a wildcard, since its not the first component of the subdomain. */
+ /* The '*' doesn't count as a wildcard, since it's not the first component of the subdomain. */
{"super.cool","testing.*","ftp",URLZONE_CUSTOM2},
/* The '*' counts since it's the first component of the subdomain. */
{"super.cool","*.testing","ftp",URLZONE_CUSTOM2},
char path[MAX_PATH];
char **argv;
PROCESS_INFORMATION pi;
- STARTUPINFO si = { 0 };
+ STARTUPINFOA si = { 0 };
BOOL ret;
GetModuleFileNameA(NULL, path, MAX_PATH);
si.cb = sizeof(si);
winetest_get_mainargs(&argv);
sprintf(cmdline, "\"%s\" %s domain_tests", argv[0], argv[1]);
- ret = CreateProcess(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
+ ret = CreateProcessA(argv[0], cmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
ok(ret, "Failed to spawn child process: %u\n", GetLastError());
winetest_wait_child_process(pi.hProcess);
CloseHandle(pi.hThread);
ok((pZA->cbSize == 0xffffffff) || (pZA->cbSize == sizeof(ZONEATTRIBUTES)),
"got cbSize = 0x%x (expected 0xffffffff)\n", pZA->cbSize);
- /* IE8 no longer fail on invalid zones */
+ /* IE8 up to IE10 don't fail on invalid zones */
memset(buffer, -1, sizeof(buffer));
hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0xdeadbeef, pZA);
- ok(hr == S_OK || (hr == E_FAIL),
+ ok(hr == S_OK || hr == E_FAIL || hr == E_POINTER,
"got 0x%x (expected S_OK or E_FAIL)\n", hr);
hr = IInternetZoneManager_GetZoneAttributes(zonemgr, 0, NULL);
testcases[i].policy_flags = URLPOLICY_ALLOW;
}
+ /* IE10 does not seem to use passed ISecurityManager */
+ SET_EXPECT(ProcessUrlAction);
+ pCoInternetIsFeatureZoneElevationEnabled(url1, url1, &security_manager, 0);
+ i = called_ProcessUrlAction;
+ SET_CALLED(ProcessUrlAction);
+ if(!i) {
+ skip("CoInternetIsFeatureZoneElevationEnabled does not use passed ISecurityManager\n");
+ return;
+ }
+
for(i=0; i<sizeof(testcases)/sizeof(testcases[0]); i++) {
url_from = a2w(testcases[i].url_from);
url_to = a2w(testcases[i].url_to);
int argc;
char **argv;
- hurlmon = GetModuleHandle("urlmon.dll");
+ hurlmon = GetModuleHandleA("urlmon.dll");
pCoInternetCreateSecurityManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateSecurityManager");
pCoInternetCreateZoneManager = (void*) GetProcAddress(hurlmon, "CoInternetCreateZoneManager");
pCoInternetGetSecurityUrl = (void*) GetProcAddress(hurlmon, "CoInternetGetSecurityUrl");
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
- /* URI is considered opaque since CREATE_NO_CRACK_UNKNOWN_SCHEMES is set and its an unknown scheme. */
+ /* URI is considered opaque since CREATE_NO_CRACK_UNKNOWN_SCHEMES is set and it's an unknown scheme. */
{ "zip://google.com", Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES, S_OK, FALSE,
{
{"zip:/.//google.com",S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
- /* Allowed to have invalid % encoded because its an unknown scheme type. */
+ /* Allowed to have invalid % encoded because it's an unknown scheme type. */
{ "zip://%xy:word@winehq.org/", 0, S_OK, FALSE,
{
{"zip://%xy:word@winehq.org/",S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
- /* Since foo isn't a recognized 3 character TLD its considered the domain name. */
+ /* Since foo isn't a recognized 3 character TLD it's considered the domain name. */
{ "http://google.foo.uk", 0, S_OK, FALSE,
{
{"http://google.foo.uk/",S_OK,FALSE},
{URLZONE_INVALID,E_NOTIMPL,FALSE}
}
},
- /* Res doesn't get forbidden characters percent encoded in it's path. */
+ /* Res doesn't get forbidden characters percent encoded in its path. */
{ "res://c:\\test/tes<|>t", 0, S_OK, FALSE,
{
{"res://c:\\test/tes<|>t",S_OK,FALSE},
{"*a*b*c*d://not.valid.com",0,FALSE},
/* Not allowed to have invalid % encoded data. */
{"ftp://google.co%XX/",0,FALSE},
- /* To many h16 components. */
+ /* Too many h16 components. */
{"http://[1:2:3:4:5:6:7:8:9]",0,FALSE},
/* Not enough room for IPv4 address. */
{"http://[1:2:3:4:5:6:7:192.0.1.0]",0,FALSE},
{"http://[::192.0]",0,FALSE},
/* Can't have elision of 1 h16 at beginning of address. */
{"http://[::2:3:4:5:6:7:8]",0,FALSE},
- /* Can't have elision of 1 h16 at end of address. */
- {"http://[1:2:3:4:5:6:7::]",0,FALSE},
/* Expects a valid IP Literal. */
{"ftp://[not.valid.uri]/",0,FALSE},
/* Expects valid port for a known scheme type. */
hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_RAW_URI, NULL, 0);
ok(hr == E_POINTER, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, E_POINTER);
- /* Make sure it handles a invalid Uri_PROPERTY's correctly. */
+ /* Make sure it handles an invalid Uri_PROPERTY correctly. */
hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_PORT, &received, 0);
- ok(hr == S_OK, "Error: GetPropertyBSTR returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
- ok(received != NULL, "Error: Expected the string not to be NULL.\n");
- ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received));
- SysFreeString(received);
+ ok(hr == E_INVALIDARG /* IE10 */ || broken(hr == S_OK), "Error: GetPropertyBSTR returned 0x%08x, expected E_INVALIDARG or S_OK.\n", hr);
+ if(SUCCEEDED(hr)) {
+ ok(received != NULL, "Error: Expected the string not to be NULL.\n");
+ ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received));
+ SysFreeString(received);
+ }else {
+ ok(!received, "received = %s\n", wine_dbgstr_w(received));
+ }
/* Make sure it handles the ZONE property correctly. */
received = NULL;
DWORD j;
for(j = Uri_PROPERTY_STRING_START; j <= Uri_PROPERTY_STRING_LAST; ++j) {
- DWORD expectedLen, brokenLen, receivedLen;
+ DWORD expectedLen, receivedLen;
uri_str_property prop = test.str_props[j];
- expectedLen = lstrlen(prop.value);
- brokenLen = lstrlen(prop.broken_value);
+ expectedLen = lstrlenA(prop.value);
/* This won't be necessary once GetPropertyLength is implemented. */
receivedLen = -1;
hr, prop.expected, i, j);
}
todo_wine {
- ok(receivedLen == expectedLen || broken(receivedLen == brokenLen),
+ ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)),
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n",
expectedLen, receivedLen, i, j);
}
} else {
ok(hr == prop.expected, "Error: GetPropertyLength returned 0x%08x, expected 0x%08x on uri_tests[%d].str_props[%d].\n",
hr, prop.expected, i, j);
- ok(receivedLen == expectedLen || broken(receivedLen == brokenLen),
+ ok(receivedLen == expectedLen || broken(prop.broken_value && receivedLen == lstrlenA(prop.broken_value)),
"Error: Expected a length of %d but got %d on uri_tests[%d].str_props[%d].\n",
expectedLen, receivedLen, i, j);
}
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetFragment(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetHost(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetPassword(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetPath(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetQuery(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetSchemeName(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
if(prop && prop->value && *prop->value) {
/* Use expected_value unless it's NULL, then use value. */
LPCSTR expected = prop->expected_value ? prop->expected_value : prop->value;
+ DWORD expected_len = expected ? strlen(expected) : 0;
hr = IUriBuilder_GetUserName(builder, &len, &received);
if(prop->todo) {
todo_wine {
expected, wine_dbgstr_w(received), test_index);
}
todo_wine {
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
}
} else {
hr, (expected ? S_OK : S_FALSE), test_index);
ok(!strcmp_aw(expected, received), "Error: Expected %s but got %s on uri_builder_tests[%d].\n",
expected, wine_dbgstr_w(received), test_index);
- ok(lstrlen(expected) == len,
+ ok(expected_len == len,
"Error: Expected the length to be %d, but was %d instead on uri_builder_tests[%d].\n",
- lstrlen(expected), len, test_index);
+ expected_len, len, test_index);
}
} else {
/* The property wasn't set earlier, so it should return whatever
hr = IUriBuilder_SetIUri(builder, uri);
ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
- /* IUriBuilder already had 'uri' as it's IUri property and so Windows doesn't
+ /* IUriBuilder already had 'uri' as its IUri property and so Windows doesn't
* reset any of the changes that were made to the IUriBuilder.
*/
hr = IUriBuilder_HasBeenModified(builder, &received);
if(test) IUri_Release(test);
/* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE
- * explicitly set (because it's a default flags).
+ * explicitly set (because it's a default flag).
*/
test = NULL;
hr = IUriBuilder_CreateUri(builder, Uri_CREATE_CANONICALIZE, 0, 0, &test);
if(test) IUri_Release(test);
/* Still returns the same IUri, even though the base one wasn't created with CREATE_CANONICALIZE
- * explicitly set (because it's a default flags).
+ * explicitly set (because it's a default flag).
*/
test = NULL;
hr = IUriBuilder_CreateUriWithFlags(builder, Uri_CREATE_CANONICALIZE, 0, 0, 0, &test);
ok(props == 0, "%d) Not all properties were processed %d. Next property type: %d\n",
i, props, dw_data[0]);
- IPersistStream_Release(persist_stream);
IUri_Release(uri);
hr = IStream_Seek(stream, no_off, STREAM_SEEK_SET, NULL);
hr = IPersistStream_GetClassID(persist_stream, &curi);
ok(hr == S_OK, "%d) GetClassID failed 0x%08x, expected S_OK.\n", i, hr);
ok(IsEqualCLSID(&curi, &CLSID_CUri), "%d) GetClassID returned incorrect CLSID.\n", i);
+ IPersistStream_Release(persist_stream);
+
hr = CoCreateInstance(&curi, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IUri, (void**)&uri);
ok(hr == S_OK, "%d) Error creating uninitialized Uri: 0x%08x.\n", i, hr);
"%d) Expected %s but got %s.\n", i, test->str_props[Uri_PROPERTY_RAW_URI].value,
wine_dbgstr_w(raw_uri));
SysFreeString(raw_uri);
+ IPersistStream_Release(persist_stream);
hr = IUri_QueryInterface(uri, &IID_IMarshal, (void**)&marshal);
ok(hr == S_OK, "%d) QueryInterface(IID_IMarshal) failed 0x%08x, expected S_OK.\n", i, hr);
IMarshal_Release(marshal);
IStream_Release(stream);
- IPersistStream_Release(persist_stream);
IUri_Release(uri);
heap_free(uriW);
}
START_TEST(uri) {
HMODULE hurlmon;
- hurlmon = GetModuleHandle("urlmon.dll");
+ hurlmon = GetModuleHandleA("urlmon.dll");
pCoInternetGetSession = (void*) GetProcAddress(hurlmon, "CoInternetGetSession");
pCreateUri = (void*) GetProcAddress(hurlmon, "CreateUri");
pCreateUriWithFragment = (void*) GetProcAddress(hurlmon, "CreateUriWithFragment");
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b);
+static const IID IID_undocumentedIE11 = {0xd5ae15f6,0x2032,0x488e,{0x8f,0x96,0xf9,0x24,0x06,0xd8,0xd8,0xb4}};
extern CLSID CLSID_AboutProtocol;
#define DEFINE_EXPECT(func) \
DEFINE_EXPECT(QueryInterface_IBindStatusCallback);
DEFINE_EXPECT(QueryInterface_IBindStatusCallbackEx);
DEFINE_EXPECT(QueryInterface_IBindStatusCallbackHolder);
-DEFINE_EXPECT(QueryInterface_IInternetBindInfo);
DEFINE_EXPECT(QueryInterface_IAuthenticate);
DEFINE_EXPECT(QueryInterface_IInternetProtocol);
DEFINE_EXPECT(QueryInterface_IWindowForBindingUI);
static BOOL abort_start = FALSE;
static BOOL abort_progress = FALSE;
static BOOL async_switch = FALSE;
+static BOOL strict_bsc_qi;
+static DWORD bindtest_flags;
static const char *test_file;
static WCHAR file_url[INTERNET_MAX_URL_LENGTH], current_url[INTERNET_MAX_URL_LENGTH];
END_DOWNLOAD
} download_state;
-static const char *debugstr_guid(REFIID riid)
-{
- static char buf[50];
-
- sprintf(buf, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
- riid->Data1, riid->Data2, riid->Data3, riid->Data4[0],
- riid->Data4[1], riid->Data4[2], riid->Data4[3], riid->Data4[4],
- riid->Data4[5], riid->Data4[6], riid->Data4[7]);
-
- return buf;
-}
-
static BOOL proxy_active(void)
{
HKEY internet_settings;
static HRESULT WINAPI Protocol_QueryInterface(IInternetProtocol *iface, REFIID riid, void **ppv)
{
+ static const IID IID_undocumentedIE10 = {0x7daf9908,0x8415,0x4005,{0x95,0xae,0xbd,0x27,0xf6,0xe3,0xdc,0x00}};
+
*ppv = NULL;
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_IInternetProtocol, riid)) {
if(IsEqualGUID(&IID_IInternetProtocolEx, riid))
return E_NOINTERFACE; /* TODO */
- ok(0, "unexpected call %s\n", debugstr_guid(riid));
+ if(IsEqualGUID(&IID_undocumentedIE10, riid)) {
+ trace("QI(%s)\n", wine_dbgstr_guid(riid));
+ return E_NOINTERFACE; /* TODO */
+ }
+
+ ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
if(filedwl_api || !is_urlmon_protocol(test_protocol) || tymed != TYMED_ISTREAM ||
!(bindf&BINDF_ASYNCSTORAGE) || !(bindf&BINDF_PULLDATA))
ok(bind_info & BINDF_NEEDFILE, "BINDF_NEEDFILE is not set\n");
- else
+ else if(test_protocol != MK_TEST) /* IE10 sets BINDF_NEEDFILE for mk: protocol */
ok(!(bind_info & BINDF_NEEDFILE), "BINDF_NEEDFILE is set\n");
bind_info &= ~(BINDF_NEEDFILE|BINDF_FROMURLMON);
static const WCHAR wszMimes[] = {'*','/','*',0};
- SET_EXPECT(QueryInterface_IInternetBindInfo);
SET_EXPECT(QueryService_IInternetBindInfo);
hres = IInternetBindInfo_GetBindString(pOIBindInfo, BINDSTRING_USER_AGENT,
&ua, 1, &fetched);
- CLEAR_CALLED(QueryInterface_IInternetBindInfo); /* IE <8 */
CLEAR_CALLED(QueryService_IInternetBindInfo); /* IE <8 */
ok(hres == E_NOINTERFACE,
case 1: {
IServiceProvider *service_provider;
IHttpNegotiate *http_negotiate;
- static WCHAR header[] = {'?',0};
+ static const WCHAR header[] = {'?',0};
hres = IInternetProtocolSink_QueryInterface(protocol_sink, &IID_IServiceProvider,
(void**)&service_provider);
}
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) {
- static int pending = TRUE;
+ static BOOL pending = TRUE;
pending = !pending;
else if(IsEqualGUID(rguidReason, &IID_ICodeInstall))
CHECK_EXPECT(GetWindow_ICodeInstall);
else
- ok(0, "Unexpected rguidReason: %s\n", debugstr_guid(rguidReason));
+ ok(0, "Unexpected rguidReason: %s\n", wine_dbgstr_guid(rguidReason));
*phwnd = NULL;
return S_OK;
return S_OK;
}
- ok(0, "unexpected service %s\n", debugstr_guid(guidService));
+ if(IsEqualGUID(&IID_IGetBindHandle, guidService)) {
+ trace("QueryService(IID_IGetBindHandle)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ if(IsEqualGUID(&IID_undocumentedIE11, guidService)) {
+ trace("QueryService(IID_undocumentedIE11)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+
+ ok(0, "unexpected service %s\n", wine_dbgstr_guid(guidService));
return E_NOINTERFACE;
}
DWORD status, size;
HRESULT hres, expect;
- /* QueryInfo changes it's behavior during this request */
+ /* QueryInfo changes its behavior during this request */
if(progress == BINDSTATUS_SENDINGREQUEST)
return;
static HRESULT WINAPI statusclb_QueryInterface(IBindStatusCallbackEx *iface, REFIID riid, void **ppv)
{
+ static const IID IID_undocumentedIE10 = {0xf286fa56,0xc1fd,0x4270,{0x8e,0x67,0xb3,0xeb,0x79,0x0a,0x81,0xe8}};
+
ok(GetCurrentThreadId() == thread_id, "wrong thread %d\n", GetCurrentThreadId());
if(IsEqualGUID(&IID_IInternetProtocol, riid)) {
}else {
return E_NOINTERFACE;
}
- }
- else if (IsEqualGUID(&IID_IServiceProvider, riid))
- {
+ }else if (IsEqualGUID(&IID_IServiceProvider, riid)) {
CHECK_EXPECT2(QueryInterface_IServiceProvider);
*ppv = &ServiceProvider;
return S_OK;
- }
- else if (IsEqualGUID(&IID_IHttpNegotiate, riid))
- {
+ }else if (IsEqualGUID(&IID_IHttpNegotiate, riid)) {
CHECK_EXPECT2(QueryInterface_IHttpNegotiate);
*ppv = &HttpNegotiate;
return S_OK;
- }
- else if (IsEqualGUID(&IID_IHttpNegotiate2, riid))
- {
+ }else if (IsEqualGUID(&IID_IHttpNegotiate2, riid)) {
CHECK_EXPECT(QueryInterface_IHttpNegotiate2);
*ppv = &HttpNegotiate;
return S_OK;
- }
- else if (IsEqualGUID(&IID_IAuthenticate, riid))
- {
+ }else if (IsEqualGUID(&IID_IAuthenticate, riid)) {
CHECK_EXPECT(QueryInterface_IAuthenticate);
return E_NOINTERFACE;
- }
- else if(IsEqualGUID(&IID_IBindStatusCallback, riid))
- {
- CHECK_EXPECT2(QueryInterface_IBindStatusCallback);
+ }else if(IsEqualGUID(&IID_IBindStatusCallback, riid)) {
+ if(strict_bsc_qi)
+ CHECK_EXPECT2(QueryInterface_IBindStatusCallback);
*ppv = iface;
return S_OK;
- }
- else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid))
- {
+ }else if(IsEqualGUID(&IID_IBindStatusCallbackHolder, riid)) {
CHECK_EXPECT2(QueryInterface_IBindStatusCallbackHolder);
return E_NOINTERFACE;
- }
- else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid))
- {
+ }else if(IsEqualGUID(&IID_IBindStatusCallbackEx, riid)) {
CHECK_EXPECT(QueryInterface_IBindStatusCallbackEx);
if(!use_bscex)
return E_NOINTERFACE;
*ppv = iface;
return S_OK;
- }
- else if(IsEqualGUID(&IID_IInternetBindInfo, riid))
- {
+ }else if(IsEqualGUID(&IID_IInternetBindInfo, riid)) {
/* TODO */
- CHECK_EXPECT2(QueryInterface_IInternetBindInfo);
- }
- else if(IsEqualGUID(&IID_IWindowForBindingUI, riid))
- {
+ }else if(IsEqualGUID(&IID_IWindowForBindingUI, riid)) {
CHECK_EXPECT2(QueryInterface_IWindowForBindingUI);
return E_NOINTERFACE;
- }
- else if(IsEqualGUID(&IID_IHttpSecurity, riid))
- {
+ }else if(IsEqualGUID(&IID_IHttpSecurity, riid)) {
CHECK_EXPECT2(QueryInterface_IHttpSecurity);
return E_NOINTERFACE;
- }
- else
- {
- ok(0, "unexpected interface %s\n", debugstr_guid(riid));
+ }else if(IsEqualGUID(&IID_IGetBindHandle, riid)) {
+ trace("QI(IID_IGetBindHandle)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }else if(IsEqualGUID(&IID_undocumentedIE10, riid)) {
+ trace("QI(IID_undocumentedIE10)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }else if(IsEqualGUID(&IID_undocumentedIE11, riid)) {
+ trace("QI(IID_undocumentedIE11)\n");
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }else {
+ ok(0, "unexpected interface %s\n", wine_dbgstr_guid(riid));
}
return E_NOINTERFACE;
hres = IBinding_GetBindResult(pib, &clsid, &res, &res_str, NULL);
ok(hres == S_OK, "GetBindResult failed: %08x, expected S_OK\n", hres);
- ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", debugstr_guid(&clsid));
+ ok(IsEqualCLSID(&clsid, &CLSID_NULL), "incorrect clsid: %s\n", wine_dbgstr_guid(&clsid));
ok(!res, "incorrect res: %x\n", res);
ok(!res_str, "incorrect res_str: %s\n", wine_dbgstr_w(res_str));
CHECK_EXPECT(Obj_OnProgress_FINDINGRESOURCE);
else if(test_protocol == FTP_TEST)
todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
+ else if(test_protocol == HTTPS_TEST && !bindtest_flags)
+ todo_wine CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
else
CHECK_EXPECT(OnProgress_FINDINGRESOURCE);
if(emulate_protocol && (test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST))
hr = CLSIDFromString((LPCOLESTR)szStatusText, &clsid);
ok(hr == S_OK, "CLSIDFromString failed with error 0x%08x\n", hr);
ok(IsEqualCLSID(&clsid, &CLSID_HTMLDocument),
- "Expected clsid to be CLSID_HTMLDocument instead of %s\n", debugstr_guid(&clsid));
+ "Expected clsid to be CLSID_HTMLDocument instead of %s\n", wine_dbgstr_guid(&clsid));
break;
}
case BINDSTATUS_BEGINSYNCOPERATION:
if(hresult==S_OK || (abort_start && hresult!=S_FALSE) || hresult == REGDB_E_CLASSNOTREG) {
ok(IsEqualCLSID(&clsid, &CLSID_NULL),
"incorrect protocol CLSID: %s, expected CLSID_NULL\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(emulate_protocol) {
todo_wine ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol),
"incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(test_protocol == FTP_TEST) {
ok(IsEqualCLSID(&clsid, &CLSID_FtpProtocol),
"incorrect protocol CLSID: %s, expected CLSID_FtpProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(test_protocol == FILE_TEST) {
ok(IsEqualCLSID(&clsid, &CLSID_FileProtocol),
"incorrect protocol CLSID: %s, expected CLSID_FileProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(test_protocol == HTTP_TEST) {
ok(IsEqualCLSID(&clsid, &CLSID_HttpProtocol),
"incorrect protocol CLSID: %s, expected CLSID_HttpProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(test_protocol == HTTPS_TEST) {
ok(IsEqualCLSID(&clsid, &CLSID_HttpSProtocol),
"incorrect protocol CLSID: %s, expected CLSID_HttpSProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else if(test_protocol == ABOUT_TEST) {
ok(IsEqualCLSID(&clsid, &CLSID_AboutProtocol),
"incorrect protocol CLSID: %s, expected CLSID_AboutProtocol\n",
- debugstr_guid(&clsid));
+ wine_dbgstr_guid(&clsid));
}else {
ok(0, "unexpected (%d)\n", test_protocol);
}
if (mime_type[0]) {
INT ret;
clipfmt[0] = 0;
- ret = GetClipboardFormatName(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1);
+ ret = GetClipboardFormatNameA(pformatetc->cfFormat, clipfmt, sizeof(clipfmt)-1);
ok(ret, "GetClipboardFormatName failed, error %d\n", GetLastError());
- ok(!lstrcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n",
+ ok(!strcmp(clipfmt, mime_type), "clipformat %x != mime_type, \"%s\" != \"%s\"\n",
pformatetc->cfFormat, clipfmt, mime_type);
} else {
ok(pformatetc->cfFormat == 0, "clipformat=%x\n", pformatetc->cfFormat);
if(iface != &objbsc)
ok(0, "unexpected call\n");
- ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "riid = %s\n", wine_dbgstr_guid(riid));
ok(punk != NULL, "punk == NULL\n");
return S_OK;
static HRESULT WINAPI MonikerProp_QueryInterface(IMonikerProp *iface, REFIID riid, void **ppv)
{
*ppv = NULL;
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
if(*ppv)
return S_OK;
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
return E_NOINTERFACE;
}
if(IsEqualGUID(&CLSID_IdentityUnmarshal, riid))
return E_NOINTERFACE;
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
return E_NOTIMPL;
}
{
CHECK_EXPECT(CreateInstance);
ok(!outer, "outer = %p\n", outer);
- ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid));
+ ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
*ppv = &PersistMoniker;
return S_OK;
}
if(IsEqualGUID(&IID_IInternetProtocolInfo, riid))
return E_NOINTERFACE;
- ok(0, "unexpected riid %s\n", debugstr_guid(riid));
+ ok(0, "unexpected riid %s\n", wine_dbgstr_guid(riid));
return E_NOTIMPL;
}
return E_NOINTERFACE;
todo_wine ok(outer != NULL, "outer == NULL\n");
- todo_wine ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", debugstr_guid(riid));
+ todo_wine ok(IsEqualGUID(&IID_IUnknown, riid), "unexpected riid %s\n", wine_dbgstr_guid(riid));
*ppv = &Protocol;
return S_OK;
}
IUnknown *unk;
HRESULT hres;
+ strict_bsc_qi = TRUE;
+
hres = CreateBindCtx(0, &bindctx);
ok(hres == S_OK, "BindCtx failed: %08x\n", hres);
IBindStatusCallback_Release(prev_clb);
IBindCtx_Release(bindctx);
+
+ strict_bsc_qi = FALSE;
return ret;
}
const char *url_a = NULL;
test_protocol = protocol;
+ bindtest_flags = flags;
emulate_protocol = (flags & BINDTEST_EMULATE) != 0;
download_state = BEFORE_DOWNLOAD;
stopped_binding = FALSE;
url_a = "its:test.chm::/blank.html";
break;
case HTTPS_TEST:
- url_a = (flags & BINDTEST_INVALID_CN) ? "https://209.46.25.132/test.html" : "https://www.codeweavers.com/test.html";
+ url_a = (flags & BINDTEST_INVALID_CN) ? "https://209.46.25.134/favicon.ico" : "https://test.winehq.org/tests/hello.html";
break;
case FTP_TEST:
url_a = "ftp://ftp.winehq.org/pub/other/winelogo.xcf.tar.bz2";
SET_EXPECT(UnlockRequest);
}else {
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) {
- SET_EXPECT(QueryInterface_IInternetBindInfo);
SET_EXPECT(QueryService_IInternetBindInfo);
if(!abort_start)
SET_EXPECT(QueryInterface_IHttpNegotiate);
return;
if((bindf & BINDF_ASYNCHRONOUS) && !no_callback) {
- while(!stopped_binding && GetMessage(&msg,NULL,0,0)) {
+ while(!stopped_binding && GetMessageA(&msg,NULL,0,0)) {
TranslateMessage(&msg);
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
}
}
}
if(emulate_protocol) {
if(is_urlmon_protocol(test_protocol))
- CHECK_CALLED(SetPriority);
+ CLEAR_CALLED(SetPriority); /* Not called by IE11 */
CHECK_CALLED(Start);
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST
|| test_protocol == WINETEST_SYNC_TEST) {
CHECK_CALLED(UnlockRequest);
}else {
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST || test_protocol == WINETEST_TEST) {
- CLEAR_CALLED(QueryInterface_IInternetBindInfo);
CLEAR_CALLED(QueryService_IInternetBindInfo);
if(!abort_start)
CHECK_CALLED(QueryInterface_IHttpNegotiate);
IUnknown_Release(unk);
while((bindf & BINDF_ASYNCHRONOUS) &&
- !((!emulate_protocol || stopped_binding) && stopped_obj_binding) && GetMessage(&msg,NULL,0,0)) {
+ !((!emulate_protocol || stopped_binding) && stopped_obj_binding) && GetMessageA(&msg,NULL,0,0)) {
TranslateMessage(&msg);
- DispatchMessage(&msg);
+ DispatchMessageA(&msg);
}
CLEAR_CALLED(QueryInterface_IBindStatusCallbackEx);
CHECK_CALLED(Obj_OnStartBinding);
if(emulate_protocol) {
if(is_urlmon_protocol(test_protocol))
- CHECK_CALLED(SetPriority);
+ CLEAR_CALLED(SetPriority); /* Not called by IE11 */
CHECK_CALLED(Start);
if(test_protocol == HTTP_TEST || test_protocol == HTTPS_TEST)
CHECK_CALLED(Terminate);
SET_EXPECT(GetBindInfo);
SET_EXPECT(QueryInterface_IInternetProtocol);
- if(!emulate_protocol) {
- SET_EXPECT(QueryInterface_IServiceProvider);
+ SET_EXPECT(QueryInterface_IServiceProvider);
+ if(!emulate_protocol)
SET_EXPECT(QueryService_IInternetProtocol);
- }
SET_EXPECT(OnStartBinding);
if(emulate_protocol) {
if(is_urlmon_protocol(test_protocol))
if(!emulate_protocol) {
CHECK_CALLED(QueryInterface_IServiceProvider);
CHECK_CALLED(QueryService_IInternetProtocol);
+ }else {
+ CLEAR_CALLED(QueryInterface_IServiceProvider);
}
CHECK_CALLED(OnStartBinding);
if(emulate_protocol) {
if(is_urlmon_protocol(test_protocol))
- CHECK_CALLED(SetPriority);
+ CLEAR_CALLED(SetPriority); /* Not called by IE11 */
CHECK_CALLED(Start);
CHECK_CALLED(UnlockRequest);
}else {
CHECK_CALLED(QueryInterface_IInternetProtocol);
CHECK_CALLED(OnStartBinding);
if(is_urlmon_protocol(test_protocol))
- CHECK_CALLED(SetPriority);
+ CLEAR_CALLED(SetPriority); /* Not called by IE11 */
CHECK_CALLED(Start);
ok(unk == NULL, "unk=%p\n", unk);
{
HMODULE hurlmon;
- hurlmon = GetModuleHandle("urlmon.dll");
+ hurlmon = GetModuleHandleA("urlmon.dll");
pCreateAsyncBindCtxEx = (void*) GetProcAddress(hurlmon, "CreateAsyncBindCtxEx");
if(!GetProcAddress(hurlmon, "CompareSecurityIds")) {
if(!pCreateUri)
win_skip("IUri not supported\n");
- complete_event = CreateEvent(NULL, FALSE, FALSE, NULL);
- complete_event2 = CreateEvent(NULL, FALSE, FALSE, NULL);
+ complete_event = CreateEventW(NULL, FALSE, FALSE, NULL);
+ complete_event2 = CreateEventW(NULL, FALSE, FALSE, NULL);
thread_id = GetCurrentThreadId();
create_html_file();
create_cache_file();
http_is_first = TRUE;
test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM);
- trace("synchronous https test (invalid CN, fail)\n");
+ bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
+
+ trace("asynchronous https test (invalid CN, fail)\n");
onsecurityproblem_hres = E_FAIL;
test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM);
- trace("synchronous https test (invalid CN, accept)\n");
+ trace("asynchronous https test (invalid CN, accept)\n");
onsecurityproblem_hres = S_OK;
test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM);
test_BindToStorage(HTTPS_TEST, BINDTEST_INVALID_CN, TYMED_ISTREAM);
invalid_cn_accepted = FALSE;
- bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
-
trace("winetest test (async switch)...\n");
test_BindToStorage(WINETEST_TEST, BINDTEST_EMULATE|BINDTEST_ASYNC_SWITCH, TYMED_ISTREAM);
test_BindToStorage(WINETEST_TEST, BINDTEST_EMULATE|BINDTEST_NO_CALLBACK|BINDTEST_USE_CACHE, TYMED_ISTREAM);
trace("asynchronous https test...\n");
- http_is_first = TRUE;
test_BindToStorage(HTTPS_TEST, 0, TYMED_ISTREAM);
trace("emulated https test...\n");