Thomas Mullaly : urlmon/tests: IUriBuilder_CreateUri functions will return the base IUri if no changes have been made .
Alexandre Julliard
julliard at winehq.org
Sat Sep 18 07:42:20 CDT 2010
Module: wine
Branch: master
Commit: 3395c5623a6fd25e8e3e2608920f8ec877462218
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3395c5623a6fd25e8e3e2608920f8ec877462218
Author: Thomas Mullaly <thomas.mullaly at gmail.com>
Date: Thu Sep 9 16:40:56 2010 -0400
urlmon/tests: IUriBuilder_CreateUri functions will return the base IUri if no changes have been made.
---
dlls/urlmon/tests/uri.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 46 insertions(+), 0 deletions(-)
diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c
index 85eb1e7..191dfcd 100644
--- a/dlls/urlmon/tests/uri.c
+++ b/dlls/urlmon/tests/uri.c
@@ -7897,6 +7897,7 @@ static void test_IUriBuilder_IUriProperty(void) {
hr = pCreateUri(http_urlW, 0, 0, &uri);
if(SUCCEEDED(hr)) {
+ IUri *test = NULL;
ULONG cur_count, orig_count;
/* IUriBuilder doesn't clone the IUri, it use the same IUri. */
@@ -7912,6 +7913,51 @@ static void test_IUriBuilder_IUriProperty(void) {
if(SUCCEEDED(hr))
ok(cur_count == orig_count, "Error: Expected uri ref count to be %d, but was %d instead.\n",
orig_count, cur_count);
+
+ /* CreateUri* functions will return back the same IUri if nothing has changed. */
+ hr = IUriBuilder_SetIUri(builder, uri);
+ ok(hr == S_OK, "Error: IUriBuilder_SetIUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
+ orig_count = get_refcnt(uri);
+
+ hr = IUriBuilder_CreateUri(builder, 0, 0, 0, &test);
+ todo_wine {
+ ok(hr == S_OK, "Error: IUriBuilder_CreateUri returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
+ }
+ if(SUCCEEDED(hr)) {
+ cur_count = get_refcnt(uri);
+ ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n",
+ orig_count+1, cur_count);
+ ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n",
+ uri, test);
+ }
+ if(test) IUri_Release(test);
+
+ test = NULL;
+ hr = IUriBuilder_CreateUriSimple(builder, 0, 0, &test);
+ todo_wine {
+ ok(hr == S_OK, "Error: IUriBuilder_CreateUriSimple returned 0x%08x, expected 0x%08x.\n", hr, S_OK);
+ }
+ if(SUCCEEDED(hr)) {
+ cur_count = get_refcnt(uri);
+ ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n",
+ orig_count+1, cur_count);
+ ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test);
+ }
+ if(test) IUri_Release(test);
+
+ test = NULL;
+ hr = IUriBuilder_CreateUriWithFlags(builder, 0, 0, 0, 0, &test);
+ todo_wine {
+ ok(hr == S_OK, "Error: IUriBuilder_CreateUriWithFlags returned 0x%08x, expected 0x%08x.\n",
+ hr, S_OK);
+ }
+ if(SUCCEEDED(hr)) {
+ cur_count = get_refcnt(uri);
+ ok(cur_count == orig_count+1, "Error: Expected uri ref count to be %d, but was %d instead.\n",
+ orig_count+1, cur_count);
+ ok(test == uri, "Error: Expected test to be %p, but was %p instead.\n", uri, test);
+ }
+ if(test) IUri_Release(test);
}
if(uri) IUri_Release(uri);
}
More information about the wine-cvs
mailing list