urlmon/tests: Use todo_wine_if() in tests.

Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
André Hentschel 2016-02-19 23:12:23 +01:00 committed by Alexandre Julliard
parent 6936bbb198
commit 8b064d69e1
2 changed files with 11 additions and 68 deletions

View file

@ -1724,14 +1724,9 @@ static void test_internet_feature_defaults(void) {
for(i = 0; i < sizeof(default_feature_tests)/sizeof(default_feature_tests[0]); ++i) { for(i = 0; i < sizeof(default_feature_tests)/sizeof(default_feature_tests[0]); ++i) {
hres = pCoInternetIsFeatureEnabled(default_feature_tests[i].feature, default_feature_tests[i].get_flags); hres = pCoInternetIsFeatureEnabled(default_feature_tests[i].feature, default_feature_tests[i].get_flags);
if(default_feature_tests[i].todo) { todo_wine_if (default_feature_tests[i].todo)
todo_wine
ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, default_feature_tests[i].expected, i); hres, default_feature_tests[i].expected, i);
} else {
ok(hres == default_feature_tests[i].expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, default_feature_tests[i].expected, i);
}
} }
} }
@ -1877,24 +1872,15 @@ static void test_CoInternetSetFeatureEnabled(void) {
for(i = 0; i < sizeof(internet_feature_tests)/sizeof(internet_feature_tests[0]); ++i) { for(i = 0; i < sizeof(internet_feature_tests)/sizeof(internet_feature_tests[0]); ++i) {
hres = pCoInternetSetFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags, hres = pCoInternetSetFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags,
internet_feature_tests[i].enable); internet_feature_tests[i].enable);
if(internet_feature_tests[i].set_todo) { todo_wine_if (internet_feature_tests[i].set_todo)
todo_wine
ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n", ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, internet_feature_tests[i].set_expected, i); hres, internet_feature_tests[i].set_expected, i);
} else {
ok(hres == internet_feature_tests[i].set_expected, "CoInternetSetFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, internet_feature_tests[i].set_expected, i);
}
hres = pCoInternetIsFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags); hres = pCoInternetIsFeatureEnabled(internet_feature_tests[i].feature, internet_feature_tests[i].set_flags);
if(internet_feature_tests[i].get_todo) { todo_wine_if (internet_feature_tests[i].get_todo)
todo_wine
ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n", ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, internet_feature_tests[i].get_expected, i); hres, internet_feature_tests[i].get_expected, i);
} else {
ok(hres == internet_feature_tests[i].get_expected, "CoInternetIsFeatureEnabled returned %08x, expected %08x on test %d\n",
hres, internet_feature_tests[i].get_expected, i);
}
} }
} }

View file

@ -940,11 +940,7 @@ static void test_zone_domain_mappings(void)
hres = IInternetSecurityManager_MapUrlToZone(secmgr, urlW, &zone, 0); hres = IInternetSecurityManager_MapUrlToZone(secmgr, urlW, &zone, 0);
ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres); ok(hres == S_OK, "MapUrlToZone failed: %08x\n", hres);
if(test->todo) todo_wine_if (test->todo)
todo_wine
ok(zone == test->zone || broken(test->broken_zone == zone),
"Expected %d, but got %d on test %d\n", test->zone, zone, i);
else
ok(zone == test->zone || broken(test->broken_zone == zone), ok(zone == test->zone || broken(test->broken_zone == zone),
"Expected %d, but got %d on test %d\n", test->zone, zone, i); "Expected %d, but got %d on test %d\n", test->zone, zone, i);
@ -1636,12 +1632,7 @@ static void test_InternetGetSecurityUrlEx(void)
result = NULL; result = NULL;
hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0); hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_DEFAULT, 0);
if(sec_url_ex_tests[i].todo) { todo_wine_if (sec_url_ex_tests[i].todo) {
todo_wine
ok(hr == sec_url_ex_tests[i].default_hres,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
hr, sec_url_ex_tests[i].default_hres, i);
} else {
ok(hr == sec_url_ex_tests[i].default_hres, ok(hr == sec_url_ex_tests[i].default_hres,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
hr, sec_url_ex_tests[i].default_hres, i); hr, sec_url_ex_tests[i].default_hres, i);
@ -1652,12 +1643,7 @@ static void test_InternetGetSecurityUrlEx(void)
hr = IUri_GetDisplayUri(result, &received); hr = IUri_GetDisplayUri(result, &received);
ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i);
if(hr == S_OK) { if(hr == S_OK) {
if(sec_url_ex_tests[i].todo) { todo_wine_if (sec_url_ex_tests[i].todo) {
todo_wine
ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received),
"Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri,
wine_dbgstr_w(received), i);
} else {
ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received),
"Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri,
wine_dbgstr_w(received), i); wine_dbgstr_w(received), i);
@ -1669,12 +1655,7 @@ static void test_InternetGetSecurityUrlEx(void)
result = NULL; result = NULL;
hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0); hr = pCoInternetGetSecurityUrlEx(uri, &result, PSU_SECURITY_URL_ONLY, 0);
if(sec_url_ex_tests[i].todo) { todo_wine_if (sec_url_ex_tests[i].todo) {
todo_wine
ok(hr == sec_url_ex_tests[i].default_hres,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
hr, sec_url_ex_tests[i].default_hres, i);
} else {
ok(hr == sec_url_ex_tests[i].default_hres, ok(hr == sec_url_ex_tests[i].default_hres,
"CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n", "CoInternetGetSecurityUrlEx returned 0x%08x, expected 0x%08x on test %d\n",
hr, sec_url_ex_tests[i].default_hres, i); hr, sec_url_ex_tests[i].default_hres, i);
@ -1685,12 +1666,7 @@ static void test_InternetGetSecurityUrlEx(void)
hr = IUri_GetDisplayUri(result, &received); hr = IUri_GetDisplayUri(result, &received);
ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i); ok(hr == S_OK, "GetDisplayUri returned 0x%08x on test %d\n", hr, i);
if(hr == S_OK) { if(hr == S_OK) {
if(sec_url_ex_tests[i].todo) { todo_wine_if (sec_url_ex_tests[i].todo) {
todo_wine
ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received),
"Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri,
wine_dbgstr_w(received), i);
} else {
ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received), ok(!strcmp_aw(sec_url_ex_tests[i].default_uri, received),
"Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri, "Expected %s but got %s on test %d\n", sec_url_ex_tests[i].default_uri,
wine_dbgstr_w(received), i); wine_dbgstr_w(received), i);
@ -1858,14 +1834,7 @@ static void test_SecurityManagerEx2(void)
ok(hres == S_OK, "CreateUri returned %08x for '%s'\n", hres, sec_mgr_ex2_tests[i].uri); ok(hres == S_OK, "CreateUri returned %08x for '%s'\n", hres, sec_mgr_ex2_tests[i].uri);
hres = IInternetSecurityManagerEx2_MapUrlToZoneEx2(sec_mgr2, uri, &zone, 0, NULL, NULL); hres = IInternetSecurityManagerEx2_MapUrlToZoneEx2(sec_mgr2, uri, &zone, 0, NULL, NULL);
if(sec_mgr_ex2_tests[i].map_todo) { todo_wine_if (sec_mgr_ex2_tests[i].map_todo) {
todo_wine
ok(hres == sec_mgr_ex2_tests[i].map_hres, "MapUrlZoneToEx2 returned %08x, expected %08x for '%s'\n",
hres, sec_mgr_ex2_tests[i].map_hres, sec_mgr_ex2_tests[i].uri);
todo_wine
ok(zone == sec_mgr_ex2_tests[i].zone, "Expected zone %d, but got %d for '%s'\n", sec_mgr_ex2_tests[i].zone,
zone, sec_mgr_ex2_tests[i].uri);
} else {
ok(hres == sec_mgr_ex2_tests[i].map_hres, "MapUrlToZoneEx2 returned %08x, expected %08x for '%s'\n", ok(hres == sec_mgr_ex2_tests[i].map_hres, "MapUrlToZoneEx2 returned %08x, expected %08x for '%s'\n",
hres, sec_mgr_ex2_tests[i].map_hres, sec_mgr_ex2_tests[i].uri); hres, sec_mgr_ex2_tests[i].map_hres, sec_mgr_ex2_tests[i].uri);
ok(zone == sec_mgr_ex2_tests[i].zone, "Expected zone %d, but got %d for '%s'\n", sec_mgr_ex2_tests[i].zone, ok(zone == sec_mgr_ex2_tests[i].zone, "Expected zone %d, but got %d for '%s'\n", sec_mgr_ex2_tests[i].zone,
@ -1876,19 +1845,7 @@ static void test_SecurityManagerEx2(void)
memset(buf, 0xf0, buf_size); memset(buf, 0xf0, buf_size);
hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, &buf_size, 0); hres = IInternetSecurityManagerEx2_GetSecurityIdEx2(sec_mgr2, uri, buf, &buf_size, 0);
if(sec_mgr_ex2_tests[i].secid_todo) { todo_wine_if (sec_mgr_ex2_tests[i].secid_todo) {
todo_wine
ok(hres == sec_mgr_ex2_tests[i].secid_hres, "GetSecurityIdEx2 returned %08x, expected %08x on test '%s'\n",
hres, sec_mgr_ex2_tests[i].secid_hres, sec_mgr_ex2_tests[i].uri);
if(sec_mgr_ex2_tests[i].secid) {
todo_wine {
ok(buf_size == sec_mgr_ex2_tests[i].secid_size, "Got wrong security id size=%d, expected %d on test '%s'\n",
buf_size, sec_mgr_ex2_tests[i].secid_size, sec_mgr_ex2_tests[i].uri);
ok(!memcmp(buf, sec_mgr_ex2_tests[i].secid, sec_mgr_ex2_tests[i].secid_size), "Got wrong security id on test '%s'\n",
sec_mgr_ex2_tests[i].uri);
}
}
} else {
ok(hres == sec_mgr_ex2_tests[i].secid_hres, "GetSecurityIdEx2 returned %08x, expected %08x on test '%s'\n", ok(hres == sec_mgr_ex2_tests[i].secid_hres, "GetSecurityIdEx2 returned %08x, expected %08x on test '%s'\n",
hres, sec_mgr_ex2_tests[i].secid_hres, sec_mgr_ex2_tests[i].uri); hres, sec_mgr_ex2_tests[i].secid_hres, sec_mgr_ex2_tests[i].uri);
if(sec_mgr_ex2_tests[i].secid) { if(sec_mgr_ex2_tests[i].secid) {