mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 18:31:26 +00:00
[LOCALUI_WINETEST]: Sync with Wine 1.5.19.
svn path=/trunk/; revision=57880
This commit is contained in:
parent
883899a1c3
commit
2c155d89bc
1 changed files with 17 additions and 9 deletions
|
@ -71,9 +71,14 @@ static PORT_INFO_2W * find_portinfo2(LPWSTR pPort)
|
||||||
|
|
||||||
if (!pi_buffer) {
|
if (!pi_buffer) {
|
||||||
res = EnumPortsW(NULL, 2, NULL, 0, &pi_needed, &pi_numports);
|
res = EnumPortsW(NULL, 2, NULL, 0, &pi_needed, &pi_numports);
|
||||||
|
if (!res && (GetLastError() == RPC_S_SERVER_UNAVAILABLE)) {
|
||||||
|
win_skip("The service 'Spooler' is required for many tests\n");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
ok(!res, "EnumPorts succeeded: got %d\n", res);
|
||||||
pi_buffer = HeapAlloc(GetProcessHeap(), 0, pi_needed);
|
pi_buffer = HeapAlloc(GetProcessHeap(), 0, pi_needed);
|
||||||
SetLastError(0xdeadbeef);
|
|
||||||
res = EnumPortsW(NULL, 2, pi_buffer, pi_needed, &pi_needed, &pi_numports);
|
res = EnumPortsW(NULL, 2, pi_buffer, pi_needed, &pi_needed, &pi_numports);
|
||||||
|
ok(res == 1, "EnumPorts failed: got %d\n", res);
|
||||||
}
|
}
|
||||||
if (pi_buffer) {
|
if (pi_buffer) {
|
||||||
pi = (PORT_INFO_2W *) pi_buffer;
|
pi = (PORT_INFO_2W *) pi_buffer;
|
||||||
|
@ -160,12 +165,12 @@ static void test_AddPortUI(void)
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
new_portname = NULL;
|
new_portname = NULL;
|
||||||
/*
|
/*
|
||||||
* - On MSDN, you can read, that no dialogs should be displayed, when hWnd
|
* - On MSDN, you can read that no dialog should be displayed when hWnd
|
||||||
* is NULL, but native localui does not care
|
* is NULL, but native localui does not care
|
||||||
* - when the new port already exist,
|
* - When the new port already exists,
|
||||||
* TRUE is returned, but new_portname is NULL
|
* TRUE is returned, but new_portname is NULL
|
||||||
* - when the new port starts with "COM" or "LPT",
|
* - When the new port starts with "COM" or "LPT",
|
||||||
* FALSE is returned with ERROR_NOT_SUPPORTED in windows
|
* FALSE is returned with ERROR_NOT_SUPPORTED on windows
|
||||||
*/
|
*/
|
||||||
res = pAddPortUI(NULL, NULL, localportW, &new_portname);
|
res = pAddPortUI(NULL, NULL, localportW, &new_portname);
|
||||||
ok( res ||
|
ok( res ||
|
||||||
|
@ -292,7 +297,13 @@ START_TEST(localui)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find installed Ports */
|
/* find installed ports */
|
||||||
|
|
||||||
|
/* "FILE:" */
|
||||||
|
file_present = find_portinfo2(portname_fileW);
|
||||||
|
|
||||||
|
if (!pi_numports) /* Nothing to test without a port */
|
||||||
|
return;
|
||||||
|
|
||||||
id = 0;
|
id = 0;
|
||||||
/* "LPT1:" - "LPT9:" */
|
/* "LPT1:" - "LPT9:" */
|
||||||
|
@ -316,9 +327,6 @@ START_TEST(localui)
|
||||||
if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW);
|
if (!pi2 && (com_absent == NULL)) com_absent = strdupW(bufferW);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* "FILE:" */
|
|
||||||
file_present = find_portinfo2(portname_fileW);
|
|
||||||
|
|
||||||
test_AddPortUI();
|
test_AddPortUI();
|
||||||
test_ConfigurePortUI();
|
test_ConfigurePortUI();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue