urlmon: Fix zone tests.

This commit is contained in:
Jacek Caban 2007-02-06 20:48:19 +01:00 committed by Alexandre Julliard
parent 719bfaf4b0
commit e39a96c5fb
2 changed files with 9 additions and 3 deletions

View file

@ -68,6 +68,8 @@ static HRESULT map_url_to_zone(LPCWSTR url, DWORD *zone)
'P','r','o','t','o','c','o','l','D','e','f','a','u','l','t','s',0};
static const WCHAR wszFile[] = {'f','i','l','e',0};
*zone = -1;
hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, schema, sizeof(schema)/sizeof(WCHAR), &size, 0);
if(FAILED(hres))
return hres;

View file

@ -539,7 +539,7 @@ static void test_FindMimeFromData(void)
ok(!lstrcmpW(mime, mime_tests[i].mime), "[%d] wrong mime\n", i);
CoTaskMemFree(mime);
}else {
ok(hres == E_FAIL, "FindMimeFromData failed: %08x, expected E_FAIL\n", hres);
ok(hres == E_FAIL, "[%d] FindMimeFromData failed: %08x, expected E_FAIL\n", i, hres);
ok(mime == (LPWSTR)0xf0f0f0f0, "[%d] mime != 0xf0f0f0f0\n", i);
}
@ -664,8 +664,11 @@ static void test_SecurityManager(void)
ok(hres == secmgr_tests[i].zone_hres,
"[%d] MapUrlToZone failed: %08x, expected %08x\n",
i, hres, secmgr_tests[i].zone_hres);
ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone,
secmgr_tests[i].zone);
if(SUCCEEDED(hres))
ok(zone == secmgr_tests[i].zone, "[%d] zone=%d, expected %d\n", i, zone,
secmgr_tests[i].zone);
else
ok(zone == secmgr_tests[i].zone || zone == -1, "[%d] zone=%d\n", i, zone);
size = sizeof(buf);
memset(buf, 0xf0, sizeof(buf));
@ -684,6 +687,7 @@ static void test_SecurityManager(void)
zone = 100;
hres = IInternetSecurityManager_MapUrlToZone(secmgr, NULL, &zone, 0);
ok(hres == E_INVALIDARG, "MapUrlToZone failed: %08x, expected E_INVALIDARG\n", hres);
ok(zone == 100, "zone=%d\n", zone);
size = sizeof(buf);
hres = IInternetSecurityManager_GetSecurityId(secmgr, NULL, buf, &size, 0);