Author: akhaldi
Date: Thu Apr 9 12:44:18 2015
New Revision: 67114
URL:
http://svn.reactos.org/svn/reactos?rev=67114&view=rev
Log:
[URLMON_WINETEST] Sync with Wine Staging 1.7.37. CORE-9246
Modified:
trunk/rostests/winetests/urlmon/misc.c
trunk/rostests/winetests/urlmon/protocol.c
trunk/rostests/winetests/urlmon/sec_mgr.c
trunk/rostests/winetests/urlmon/stream.c
trunk/rostests/winetests/urlmon/url.c
Modified: trunk/rostests/winetests/urlmon/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/misc.c?r…
==============================================================================
--- trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/misc.c [iso-8859-1] Thu Apr 9 12:44:18 2015
@@ -290,7 +290,6 @@
IEnumFORMATETC_Release(format);
IBindCtx_Release(bctx);
}
-
static const WCHAR url1[] =
{'r','e','s',':','/','/','m','s','h','t','m','l','.','d','l','l',
'/','b','l','a','n','k','.','h','t','m',0};
static const WCHAR url2[] =
{'i','n','d','e','x','.','h','t','m',0};
@@ -306,9 +305,7 @@
static const WCHAR url9[] =
{'h','t','t','p',':','/','/','w','w','w','.','w','i','n','e','h','q','.','o','r','g',
'/','s','i','t','e','/','a','b','o','u','t',0};
-static const WCHAR url10[] =
{'f','i','l','e',':','/','/','s','o','m','e','%','2','0','f','i','l','e',
- '.','j','p','g',0};
-static const WCHAR url11[] =
{'h','t','t','p',':','/','/','g','o','o','g','l','e','.','*','.',
+static const WCHAR url10[] =
{'h','t','t','p',':','/','/','g','o','o','g','l','e','.','*','.',
'c','o','m',0};
static const WCHAR url4e[] =
{'f','i','l','e',':','s','o','m','e','
','f','i','l','e',
'.','j','p','g',0};
@@ -349,7 +346,7 @@
{url4, E_FAIL, url4e, S_OK, path4, wszFile, wszEmpty, S_OK, NULL, E_FAIL},
{url5, E_FAIL, url5, E_INVALIDARG, NULL, wszHttp, wszWineHQ, S_OK, wszHttpWineHQ,
S_OK},
{url6, S_OK, url6, E_INVALIDARG, NULL, wszAbout, NULL, E_FAIL, NULL, E_FAIL},
- {url11, E_FAIL, url11, E_INVALIDARG, NULL, wszHttp, wszGoogle, S_OK,
wszHttpGoogle, S_OK}
+ {url10, E_FAIL, url10, E_INVALIDARG,NULL, wszHttp, wszGoogle, S_OK, wszHttpGoogle,
S_OK}
};
static void test_CoInternetParseUrl(void)
@@ -472,17 +469,22 @@
}
static const struct {
- const WCHAR *url;
+ const char *url;
const char *mime;
HRESULT hres;
+ BOOL broken_failure;
+ const char *broken_mime;
} mime_tests[] = {
- {url1, "text/html", S_OK},
- {url2, "text/html", S_OK},
- {url3, "text/html", S_OK},
- {url4, NULL, E_FAIL},
- {url5, NULL, __HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)},
- {url6, NULL, E_FAIL},
- {url7, NULL, __HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)}
+ {"res://mshtml.dll/blank.htm", "text/html", S_OK},
+ {"index.htm", "text/html", S_OK},
+ {"file://c:\\Index.htm", "text/html", S_OK},
+ {"file://c:\\Index.htm?q=test", "text/html", S_OK, TRUE},
+ {"file://c:\\Index.htm#hash_part", "text/html", S_OK, TRUE},
+ {"file://c:\\Index.htm#hash_part.txt", "text/html", S_OK, FALSE,
"text/plain"},
+ {"file://some%20file%2ejpg", NULL, E_FAIL},
+ {"http://www.winehq.org", NULL,
__HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)},
+ {"about:blank", NULL, E_FAIL},
+ {"ftp://winehq.org/file.test", NULL,
__HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)}
};
static BYTE data1[] = "test data\n";
@@ -719,11 +721,16 @@
for(i=0; i<sizeof(mime_tests)/sizeof(mime_tests[0]); i++) {
mime = (LPWSTR)0xf0f0f0f0;
- hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, NULL, 0, &mime,
0);
+ url = a2w(mime_tests[i].url);
+ hres = pFindMimeFromData(NULL, url, NULL, 0, NULL, 0, &mime, 0);
if(mime_tests[i].mime) {
- ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres);
- ok(!strcmp_wa(mime, mime_tests[i].mime), "[%d] wrong mime: %s\n",
i, wine_dbgstr_w(mime));
- CoTaskMemFree(mime);
+ ok(hres == S_OK || broken(mime_tests[i].broken_failure), "[%d]
FindMimeFromData failed: %08x\n", i, hres);
+ if(hres == S_OK) {
+ ok(!strcmp_wa(mime, mime_tests[i].mime)
+ || broken(mime_tests[i].broken_mime && !strcmp_wa(mime,
mime_tests[i].broken_mime)),
+ "[%d] wrong mime: %s\n", i, wine_dbgstr_w(mime));
+ CoTaskMemFree(mime);
+ }
}else {
ok(hres == E_FAIL || hres == mime_tests[i].hres,
"[%d] FindMimeFromData failed: %08x, expected %08x\n",
@@ -732,16 +739,17 @@
}
mime = (LPWSTR)0xf0f0f0f0;
- hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, text_plainW, 0,
&mime, 0);
+ hres = pFindMimeFromData(NULL, url, NULL, 0, text_plainW, 0, &mime, 0);
ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres);
ok(!strcmp_wa(mime, "text/plain"), "[%d] wrong mime: %s\n",
i, wine_dbgstr_w(mime));
CoTaskMemFree(mime);
mime = (LPWSTR)0xf0f0f0f0;
- hres = pFindMimeFromData(NULL, mime_tests[i].url, NULL, 0, app_octet_streamW, 0,
&mime, 0);
+ hres = pFindMimeFromData(NULL, url, NULL, 0, app_octet_streamW, 0, &mime,
0);
ok(hres == S_OK, "[%d] FindMimeFromData failed: %08x\n", i, hres);
ok(!strcmp_wa(mime, "application/octet-stream"), "[%d] wrong mime:
%s\n", i, wine_dbgstr_w(mime));
CoTaskMemFree(mime);
+ heap_free(url);
}
for(i=0; i < sizeof(mime_tests2)/sizeof(mime_tests2[0]); i++) {
Modified: trunk/rostests/winetests/urlmon/protocol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/protocol…
==============================================================================
--- trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] Thu Apr 9 12:44:18 2015
@@ -1996,7 +1996,9 @@
memcpy(pv, "gif87a", 6);
prot_read += *pcbRead = cb;
return S_OK;
- }if(prot_state == 4) {
+ }
+
+ if(prot_state == 4) {
*pcbRead = 0;
return S_FALSE;
}
@@ -2930,7 +2932,7 @@
ok(hres == S_OK, "LockRequest failed: %08x\n", hres);
hres = IInternetProtocol_Read(protocol, buf, 1, &cb);
- ok(hres == test_abort ? S_OK : S_FALSE, "Read failed: %08x\n", hres);
+ ok(hres == (test_abort ? S_OK : S_FALSE), "Read failed: %08x\n", hres);
hres = IInternetProtocol_Terminate(protocol, 0);
ok(hres == S_OK, "Terminate failed: %08x\n", hres);
Modified: trunk/rostests/winetests/urlmon/sec_mgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/sec_mgr.…
==============================================================================
--- trunk/rostests/winetests/urlmon/sec_mgr.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/sec_mgr.c [iso-8859-1] Thu Apr 9 12:44:18 2015
@@ -118,9 +118,6 @@
static const WCHAR url16[] =
{'f','i','l','e',':','/','/','/','c',':',0};
static const WCHAR url17[] =
{'f','i','l','e',':','/','/','/','c',':','c','\\',0};
static const WCHAR url18[] =
{'c',':','\\','t','e','s','t','.','h','t','m',0};
-
-static const WCHAR url4e[] =
{'f','i','l','e',':','s','o','m','e','
','f','i','l','e',
- '.','j','p','g',0};
static const WCHAR winetestW[] =
{'w','i','n','e','t','e','s','t',0};
static const WCHAR security_urlW[] =
{'w','i','n','e','t','e','s','t',':','t','e','s','t','i','n','g',0};
Modified: trunk/rostests/winetests/urlmon/stream.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/stream.c…
==============================================================================
--- trunk/rostests/winetests/urlmon/stream.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/stream.c [iso-8859-1] Thu Apr 9 12:44:18 2015
@@ -82,7 +82,6 @@
DEFINE_EXPECT(GetBindInfo);
static const CHAR wszIndexHtmlA[] = "index.html";
-static const WCHAR wszIndexHtml[] =
{'i','n','d','e','x','.','h','t','m','l',0};
static WCHAR INDEX_HTML[MAX_PATH];
static const char szHtmlDoc[] = "<HTML></HTML>";
Modified: trunk/rostests/winetests/urlmon/url.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/url.c?re…
==============================================================================
--- trunk/rostests/winetests/urlmon/url.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/url.c [iso-8859-1] Thu Apr 9 12:44:18 2015
@@ -170,7 +170,6 @@
static const WCHAR wszWineHQIP[] =
{'2','0','9','.','3','2','.','1','4','1','.','3',0};
static const CHAR wszIndexHtmlA[] = "index.html";
-static const WCHAR wszIndexHtml[] =
{'i','n','d','e','x','.','h','t','m','l',0};
static const WCHAR cache_fileW[] =
{'c',':','\\','c','a','c','h','e','.','h','t','m',0};
static const CHAR dwl_htmlA[] = "dwl.html";
static const WCHAR dwl_htmlW[] =
{'d','w','l','.','h','t','m','l',0};
@@ -772,7 +771,7 @@
}
IHttpNegotiate2_Release(http_negotiate2);
ok(hres == E_FAIL, "GetRootSecurityId failed: %08x, expected E_FAIL\n",
hres);
- ok(size == no_callback ? 512 : 13, "size=%d\n", size);
+ ok(size == (no_callback ? 512 : 13), "size=%d\n", size);
if(!no_callback) {
SET_EXPECT(QueryService_IHttpSecurity);