Author: dchapyshev
Date: Sat Sep 10 16:17:35 2016
New Revision: 72645
URL:
http://svn.reactos.org/svn/reactos?rev=72645&view=rev
Log:
[WIN32KNT_APITEST]
- Remove wrong tests. Win2k3 ignores the size of structure for GET/SET NONCLIENTMETRICS,
MINIMIZEDMETRICS, ICONMETRICS
[NtUser]
- Remove wrong checks
Modified:
trunk/reactos/win32ss/user/ntuser/sysparams.c
trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c
Modified: trunk/reactos/win32ss/user/ntuser/sysparams.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/syspar…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/sysparams.c [iso-8859-1] Sat Sep 10 16:17:35 2016
@@ -906,27 +906,11 @@
case SPI_GETNONCLIENTMETRICS:
{
- LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(NONCLIENTMETRICSW))
- return 0;
-
- if (!metrics || metrics->cbSize != sizeof(NONCLIENTMETRICSW))
- return 0;
-
return SpiGet(pvParam, &gspv.ncm, sizeof(NONCLIENTMETRICSW), fl);
}
case SPI_SETNONCLIENTMETRICS:
{
- LPNONCLIENTMETRICSW metrics = (LPNONCLIENTMETRICSW)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(NONCLIENTMETRICSW))
- return 0;
-
- if (!metrics || metrics->cbSize != sizeof(NONCLIENTMETRICSW))
- return 0;
-
if (!SpiSet(&gspv.ncm, pvParam, sizeof(NONCLIENTMETRICSW), fl))
return 0;
@@ -959,27 +943,11 @@
case SPI_GETMINIMIZEDMETRICS:
{
- LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(MINIMIZEDMETRICS))
- return 0;
-
- if (!metrics || metrics->cbSize != sizeof(MINIMIZEDMETRICS))
- return 0;
-
return SpiGet(pvParam, &gspv.mm, sizeof(MINIMIZEDMETRICS), fl);
}
case SPI_SETMINIMIZEDMETRICS:
{
- LPMINIMIZEDMETRICS metrics = (LPMINIMIZEDMETRICS)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(MINIMIZEDMETRICS))
- return 0;
-
- if (!metrics || metrics->cbSize != sizeof(MINIMIZEDMETRICS))
- return 0;
-
if (!SpiSet(&gspv.mm, pvParam, sizeof(MINIMIZEDMETRICS), fl))
return 0;
@@ -1001,27 +969,11 @@
case SPI_GETICONMETRICS:
{
- LPICONMETRICSW IconMetrics = (LPICONMETRICSW)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(ICONMETRICSW))
- return 0;
-
- if (!IconMetrics || IconMetrics->cbSize != sizeof(ICONMETRICSW))
- return 0;
-
return SpiGet(pvParam, &gspv.im, sizeof(ICONMETRICSW), fl);
}
case SPI_SETICONMETRICS:
{
- LPICONMETRICSW IconMetrics = (LPICONMETRICSW)pvParam;
-
- if (uiParam != 0 && uiParam != sizeof(ICONMETRICSW))
- return 0;
-
- if (!IconMetrics || IconMetrics->cbSize != sizeof(ICONMETRICSW))
- return 0;
-
if (!SpiSet(&gspv.im, pvParam, sizeof(ICONMETRICSW), fl))
return 0;
Modified: trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/win32nt/ntuser/N…
==============================================================================
--- trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1]
(original)
+++ trunk/rostests/apitests/win32nt/ntuser/NtUserSystemParametersInfo.c [iso-8859-1] Sat
Sep 10 16:17:35 2016
@@ -743,7 +743,6 @@
metrics.cbSize = sizeof(NONCLIENTMETRICSW);
TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW),
&metrics, 0) == 1);
- TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW) +
1, &metrics, 0) == 0);
TEST(NtUserSystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW),
(PVOID)0xdeadbeef, 0) == 0);
}
@@ -754,7 +753,6 @@
metrics.cbSize = sizeof(MINIMIZEDMETRICS);
TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
(PVOID)&metrics, 0) == 1);
- TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS) +
1, (PVOID)&metrics, 0) == 0);
TEST(NtUserSystemParametersInfo(SPI_GETMINIMIZEDMETRICS, sizeof(MINIMIZEDMETRICS),
(PVOID)0xdeadbeef, 0) == 0);
}
@@ -765,7 +763,6 @@
metrics.cbSize = sizeof(ICONMETRICSW);
TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW),
(PVOID)&metrics, 0) == 1);
- TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW) + 1,
(PVOID)&metrics, 0) == 0);
TEST(NtUserSystemParametersInfo(SPI_GETICONMETRICS, sizeof(ICONMETRICSW),
(PVOID)0xdeadbeef, 0) == 0);
}