Commit 40f5cffa authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

gdi32/tests: CloseMetaFile() no longer destroys the metafile hdc.

Windows 10 1507 still deleted it but 1607 no longer does. Signed-off-by: 's avatarFrancois Gouget <fgouget@free.fr> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f2060812
......@@ -2082,7 +2082,9 @@ static void test_mf_Blank(void)
ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError());
type = GetObjectType(hMetafile);
ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type);
ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n");
type = GetObjectType(hdcMetafile);
ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
"CloseMetaFile has to destroy metafile hdc (%d)\n", type);
if (compare_mf_bits (hMetafile, MF_BLANK_BITS, sizeof(MF_BLANK_BITS),
"mf_blank") != 0)
......@@ -2249,6 +2251,7 @@ static void test_mf_Graphics(void)
HDC hdcMetafile;
HMETAFILE hMetafile;
POINT oldpoint;
INT type;
BOOL ret;
hdcMetafile = CreateMetaFileA(NULL);
......@@ -2275,7 +2278,9 @@ static void test_mf_Graphics(void)
hMetafile = CloseMetaFile(hdcMetafile);
ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError());
ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n");
type = GetObjectType(hdcMetafile);
ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
"CloseMetaFile has to destroy metafile hdc (%d)\n", type);
if (compare_mf_bits (hMetafile, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS),
"mf_Graphics") != 0)
......@@ -2296,6 +2301,7 @@ static void test_mf_PatternBrush(void)
LOGBRUSH *orig_lb;
HBRUSH hBrush;
BOOL ret;
INT type;
orig_lb = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LOGBRUSH));
......@@ -2316,7 +2322,9 @@ static void test_mf_PatternBrush(void)
hMetafile = CloseMetaFile(hdcMetafile);
ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError());
ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n");
type = GetObjectType(hdcMetafile);
ok(type == 0 || broken(type == OBJ_METADC) /* win10 >=1607 */,
"CloseMetaFile has to destroy metafile hdc (%d)\n", type);
if (compare_mf_bits (hMetafile, MF_PATTERN_BRUSH_BITS, sizeof(MF_PATTERN_BRUSH_BITS),
"mf_Pattern_Brush") != 0)
......
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