Author: pschweitzer
Date: Sun Sep 7 10:13:38 2008
New Revision: 36036
URL:
http://svn.reactos.org/svn/reactos?rev=36036&view=rev
Log:
Synced urlmon_winetest.exe with Wine HEAD
Modified:
trunk/rostests/winetests/urlmon/protocol.c
trunk/rostests/winetests/urlmon/stream.c
trunk/rostests/winetests/urlmon/testlist.c
trunk/rostests/winetests/urlmon/url.c
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] Sun Sep 7 10:13:38 2008
@@ -28,8 +28,6 @@
#include "ole2.h"
#include "urlmon.h"
#include "wininet.h"
-
-#include "initguid.h"
#define DEFINE_EXPECT(func) \
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
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] Sun Sep 7 10:13:38 2008
@@ -76,6 +76,7 @@
DEFINE_EXPECT(OnDataAvailable);
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>";
@@ -260,26 +261,22 @@
static IBindStatusCallback BindStatusCallback = { &BindStatusCallbackVtbl };
-static void set_file_url(void)
-{
- int len;
-
- static const WCHAR wszFile[] =
{'f','i','l','e',':','/','/'};
-
- memcpy(INDEX_HTML, wszFile, sizeof(wszFile));
- len = sizeof(wszFile)/sizeof(WCHAR);
- INDEX_HTML[len++] = '/';
- len += GetCurrentDirectoryW(sizeof(INDEX_HTML)/sizeof(WCHAR)-len, INDEX_HTML+len);
- INDEX_HTML[len++] = '\\';
- memcpy(INDEX_HTML+len, wszIndexHtml, sizeof(wszIndexHtml));
+static void set_file_url(char *path)
+{
+ char INDEX_HTML_A[MAX_PATH];
+
+ lstrcpyA(INDEX_HTML_A, "file:///");
+ lstrcatA(INDEX_HTML_A, path);
+ MultiByteToWideChar(CP_ACP, 0, INDEX_HTML_A, -1, INDEX_HTML, MAX_PATH);
}
static void create_file(void)
{
HANDLE file;
DWORD size;
-
- file = CreateFileW(wszIndexHtml, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
+ CHAR path[MAX_PATH];
+
+ file = CreateFileA(wszIndexHtmlA, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
ok(file != INVALID_HANDLE_VALUE, "CreateFile failed\n");
if(file == INVALID_HANDLE_VALUE)
@@ -288,7 +285,10 @@
WriteFile(file, szHtmlDoc, sizeof(szHtmlDoc)-1, &size, NULL);
CloseHandle(file);
- set_file_url();
+ GetCurrentDirectoryA(MAX_PATH, path);
+ lstrcatA(path, "\\");
+ lstrcatA(path, wszIndexHtmlA);
+ set_file_url(path);
}
static void test_URLOpenBlockingStreamW(void)
@@ -370,5 +370,5 @@
create_file();
test_URLOpenBlockingStreamW();
test_URLOpenStreamW();
- DeleteFileW(wszIndexHtml);
-}
+ DeleteFileA(wszIndexHtmlA);
+}
Modified: trunk/rostests/winetests/urlmon/testlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/testlist…
==============================================================================
--- trunk/rostests/winetests/urlmon/testlist.c [iso-8859-1] (original)
+++ trunk/rostests/winetests/urlmon/testlist.c [iso-8859-1] Sun Sep 7 10:13:38 2008
@@ -6,18 +6,8 @@
#define STANDALONE
#include "wine/test.h"
-extern void func_generated(void);
-extern void func_misc(void);
-extern void func_protocol(void);
-extern void func_stream(void);
-extern void func_url(void);
const struct test winetest_testlist[] =
{
- { "generated", func_generated },
- { "misc", func_misc },
- { "protocol", func_protocol },
- { "stream", func_stream },
- { "url", func_url },
{ 0, 0 }
};
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] Sun Sep 7 10:13:38 2008
@@ -28,11 +28,16 @@
#include "windef.h"
#include "winbase.h"
+#include "initguid.h"
#include "urlmon.h"
#include "wininet.h"
#include "mshtml.h"
#include "wine/test.h"
+
+DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
+DEFINE_GUID(CLSID_IdentityUnmarshal,0x0000001b,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
+DEFINE_GUID(IID_IBindStatusCallbackHolder,0x79eac9cc,0xbaf9,0x11ce,0x8c,0x82,0x00,0xaa,0x00,0x4b,0xa9,0x0b);
#define DEFINE_EXPECT(func) \
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
@@ -154,8 +159,6 @@
static IInternetProtocolSink *protocol_sink = NULL;
static HANDLE complete_event, complete_event2;
static HRESULT binding_hres;
-
-extern IID IID_IBindStatusCallbackHolder;
static LPCWSTR urls[] = {
WINE_ABOUT_URL,