forked from Mirrors/wine-wine
urlmon: Fixed tests on IE10.
parent
5a69b888f7
commit
9c7057c226
|
@ -4607,8 +4607,6 @@ static const invalid_uri invalid_uri_tests[] = {
|
||||||
{"http://[::192.0]",0,FALSE},
|
{"http://[::192.0]",0,FALSE},
|
||||||
/* Can't have elision of 1 h16 at beginning of address. */
|
/* Can't have elision of 1 h16 at beginning of address. */
|
||||||
{"http://[::2:3:4:5:6:7:8]",0,FALSE},
|
{"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. */
|
/* Expects a valid IP Literal. */
|
||||||
{"ftp://[not.valid.uri]/",0,FALSE},
|
{"ftp://[not.valid.uri]/",0,FALSE},
|
||||||
/* Expects valid port for a known scheme type. */
|
/* Expects valid port for a known scheme type. */
|
||||||
|
@ -7420,10 +7418,14 @@ static void test_IUri_GetPropertyBSTR(void) {
|
||||||
|
|
||||||
/* Make sure it handles a invalid Uri_PROPERTY's correctly. */
|
/* Make sure it handles a invalid Uri_PROPERTY's correctly. */
|
||||||
hr = IUri_GetPropertyBSTR(uri, Uri_PROPERTY_PORT, &received, 0);
|
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(hr == E_INVALIDARG /* IE10 */ || broken(hr == S_OK), "Error: GetPropertyBSTR returned 0x%08x, expected E_INVALIDARG or S_OK.\n", hr);
|
||||||
ok(received != NULL, "Error: Expected the string not to be NULL.\n");
|
if(SUCCEEDED(hr)) {
|
||||||
ok(!SysStringLen(received), "Error: Expected the string to be of len=0 but it was %d instead.\n", SysStringLen(received));
|
ok(received != NULL, "Error: Expected the string not to be NULL.\n");
|
||||||
SysFreeString(received);
|
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. */
|
/* Make sure it handles the ZONE property correctly. */
|
||||||
received = NULL;
|
received = NULL;
|
||||||
|
|
|
@ -4279,16 +4279,16 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
if(uriProp > Uri_PROPERTY_STRING_LAST) {
|
if(uriProp > Uri_PROPERTY_STRING_LAST) {
|
||||||
/* Windows allocates an empty BSTR for invalid Uri_PROPERTY's. */
|
|
||||||
*pbstrProperty = SysAllocStringLen(NULL, 0);
|
|
||||||
if(!(*pbstrProperty))
|
|
||||||
return E_OUTOFMEMORY;
|
|
||||||
|
|
||||||
/* It only returns S_FALSE for the ZONE property... */
|
/* It only returns S_FALSE for the ZONE property... */
|
||||||
if(uriProp == Uri_PROPERTY_ZONE)
|
if(uriProp == Uri_PROPERTY_ZONE) {
|
||||||
|
*pbstrProperty = SysAllocStringLen(NULL, 0);
|
||||||
|
if(!(*pbstrProperty))
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
else
|
}
|
||||||
return S_OK;
|
|
||||||
|
*pbstrProperty = NULL;
|
||||||
|
return E_INVALIDARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't have support for flags yet. */
|
/* Don't have support for flags yet. */
|
||||||
|
|
Loading…
Reference in New Issue