Jacek Caban : urlmon: Fixed tests on IE10.
Alexandre Julliard
julliard at winehq.org
Fri Nov 22 10:23:07 CST 2013
Module: wine
Branch: master
Commit: 9c7057c226d10986dee59eb3ee225fb26e2aa943
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c7057c226d10986dee59eb3ee225fb26e2aa943
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Nov 22 14:35:55 2013 +0100
urlmon: Fixed tests on IE10.
---
dlls/urlmon/tests/uri.c | 14 ++++++++------
dlls/urlmon/uri.c | 16 ++++++++--------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c
index 2aeb05d..7bd1e03 100644
--- a/dlls/urlmon/tests/uri.c
+++ b/dlls/urlmon/tests/uri.c
@@ -4607,8 +4607,6 @@ static const invalid_uri invalid_uri_tests[] = {
{"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. */
@@ -7420,10 +7418,14 @@ static void test_IUri_GetPropertyBSTR(void) {
/* Make sure it handles a invalid Uri_PROPERTY's 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;
diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index 72e9053..963e60e 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -4279,16 +4279,16 @@ static HRESULT WINAPI Uri_GetPropertyBSTR(IUri *iface, Uri_PROPERTY uriProp, BST
return E_POINTER;
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... */
- if(uriProp == Uri_PROPERTY_ZONE)
+ if(uriProp == Uri_PROPERTY_ZONE) {
+ *pbstrProperty = SysAllocStringLen(NULL, 0);
+ if(!(*pbstrProperty))
+ return E_OUTOFMEMORY;
return S_FALSE;
- else
- return S_OK;
+ }
+
+ *pbstrProperty = NULL;
+ return E_INVALIDARG;
}
/* Don't have support for flags yet. */
More information about the wine-cvs
mailing list