Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/opcservices/tests/opcservices.c | 3 +-- dlls/urlmon/uri.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/dlls/opcservices/tests/opcservices.c b/dlls/opcservices/tests/opcservices.c index 936e2c751d..cfd11491ee 100644 --- a/dlls/opcservices/tests/opcservices.c +++ b/dlls/opcservices/tests/opcservices.c @@ -531,10 +531,9 @@ static void test_rel_part_uri(void) ok(SUCCEEDED(hr), "Failed to get source uri, hr %#x.\n", hr); ok(source_uri != source_uri2, "Unexpected instance.\n"); hr = IOpcUri_IsEqual(source_uri, (IUri *)source_uri2, &ret); - todo_wine { ok(SUCCEEDED(hr), "IsEqual failed, hr %#x.\n", hr); ok(ret, "Expected equal uris.\n"); - } + hr = IOpcUri_QueryInterface(source_uri, &IID_IOpcPartUri, (void **)&unk); ok(hr == (is_root ? E_NOINTERFACE : S_OK), "Unexpected hr %#x, %s.\n", hr, rel_part_uri_tests[i].uri); if (unk) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 92978dc53f..20a7c1a5f3 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -5017,8 +5017,22 @@ static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual)
/* Try to convert it to a Uri (allows for a more simple comparison). */ if(!(other = get_uri_obj(pUri))) { - FIXME("(%p)->(%p %p) No support for unknown IUri's yet.\n", iface, pUri, pfEqual); - return E_NOTIMPL; + IUri *other_uri; + HRESULT hr; + BSTR raw; + + hr = IUri_GetRawUri(pUri, &raw); + if (FAILED(hr)) + return hr; + + hr = CreateUri(raw, Uri_CREATE_ALLOW_RELATIVE, 0, &other_uri); + SysFreeString(raw); + if (FAILED(hr)) + return hr; + + hr = Uri_IsEqual(iface, other_uri, pfEqual); + IUri_Release(other_uri); + return hr; }
TRACE("comparing to %s\n", debugstr_w(other->canon_uri));
Hi Nikolay,
On 09/17/2018 06:00 AM, Nikolay Sivov wrote:
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com
dlls/opcservices/tests/opcservices.c | 3 +-- dlls/urlmon/uri.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-)
It would be interesting to have some urlmon tests for that. While what you do seems reasonable, a test in opcservices is not convincing. For all I know, native opcservices may call urlmon in a different way (or not at all). Please add a custom IUri implementation inside urlmon tests pass that to IsEqual.
Jacek
On 09/17/2018 06:10 PM, Jacek Caban wrote:
Hi Nikolay,
On 09/17/2018 06:00 AM, Nikolay Sivov wrote:
Signed-off-by: Nikolay Sivovnsivov@codeweavers.com
dlls/opcservices/tests/opcservices.c | 3 +-- dlls/urlmon/uri.c | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-)
It would be interesting to have some urlmon tests for that. While what you do seems reasonable, a test in opcservices is not convincing. For all I know, native opcservices may call urlmon in a different way (or not at all). Please add a custom IUri implementation inside urlmon tests pass that to IsEqual.
Fair enough, I sent another version. Thanks for the review.
Jacek