shdocvw: Get rid of Gecko checks in tests.

This commit is contained in:
Jacek Caban 2009-11-19 21:31:51 +01:00 committed by Alexandre Julliard
parent 785fb1d2e1
commit 655e0a0c54

View file

@ -2368,40 +2368,8 @@ static void test_WebBrowser(BOOL do_download)
ok(ref == 0, "ref=%d, expected 0\n", ref);
}
static void gecko_installer_workaround(BOOL disable)
{
HKEY hkey;
DWORD res;
static BOOL has_url = FALSE;
static char url[2048];
if(!disable && !has_url)
return;
res = RegOpenKey(HKEY_CURRENT_USER, "Software\\Wine\\MSHTML", &hkey);
if(res != ERROR_SUCCESS)
return;
if(disable) {
DWORD type, size = sizeof(url);
res = RegQueryValueEx(hkey, "GeckoUrl", NULL, &type, (PVOID)url, &size);
if(res == ERROR_SUCCESS && type == REG_SZ)
has_url = TRUE;
RegDeleteValue(hkey, "GeckoUrl");
}else {
RegSetValueEx(hkey, "GeckoUrl", 0, REG_SZ, (PVOID)url, lstrlenA(url)+1);
}
RegCloseKey(hkey);
}
START_TEST(webbrowser)
{
gecko_installer_workaround(TRUE);
container_hwnd = create_container_window();
OleInitialize(NULL);
@ -2412,6 +2380,4 @@ START_TEST(webbrowser)
test_WebBrowser(TRUE);
OleUninitialize();
gecko_installer_workaround(FALSE);
}