Commit 051fc345 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

mshtml/tests: Fix timeouts on Win9x/WinMe by using more A-functions.

parent a2c41b72
...@@ -2221,14 +2221,14 @@ static void test_simple_script(void) ...@@ -2221,14 +2221,14 @@ static void test_simple_script(void)
static void run_js_script(const char *test_name) static void run_js_script(const char *test_name)
{ {
WCHAR url[INTERNET_MAX_URL_LENGTH]; WCHAR url[INTERNET_MAX_URL_LENGTH];
char urlA[INTERNET_MAX_URL_LENGTH];
IPersistMoniker *persist; IPersistMoniker *persist;
IHTMLDocument2 *doc; IHTMLDocument2 *doc;
IMoniker *mon; IMoniker *mon;
WCHAR *ptr;
MSG msg; MSG msg;
HRESULT hres; HRESULT hres;
static const WCHAR resW[] = {'r','e','s',':','/','/'}; static const char res[] = "res://";
trace("running %s...\n", test_name); trace("running %s...\n", test_name);
...@@ -2239,12 +2239,11 @@ static void run_js_script(const char *test_name) ...@@ -2239,12 +2239,11 @@ static void run_js_script(const char *test_name)
set_client_site(doc, TRUE); set_client_site(doc, TRUE);
do_advise(doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink); do_advise(doc, &IID_IPropertyNotifySink, (IUnknown*)&PropertyNotifySink);
memcpy(url, resW, sizeof(resW)); lstrcpyA(urlA, res);
ptr = url + sizeof(resW)/sizeof(WCHAR); GetModuleFileNameA(NULL, urlA + lstrlenA(res), sizeof(urlA) - lstrlenA(res));
GetModuleFileNameW(NULL, ptr, sizeof(url)/sizeof(WCHAR) - (ptr-url)); lstrcatA(urlA, "/");
ptr += lstrlenW(ptr); lstrcatA(urlA, test_name);
*ptr++ = '/'; MultiByteToWideChar(CP_ACP, 0, urlA, -1, url, sizeof(url)/sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, test_name, -1, ptr, sizeof(url)/sizeof(WCHAR) - (ptr-url));
hres = CreateURLMoniker(NULL, url, &mon); hres = CreateURLMoniker(NULL, url, &mon);
ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres); ok(hres == S_OK, "CreateURLMoniker failed: %08x\n", hres);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment