Commit 760b01cb authored by Florian Will's avatar Florian Will Committed by Alexandre Julliard

gdiplus/tests: Test for GdipPrivateAddFontFile() sharing violation.

(cherry picked from commit 0ebf3222)
parent ed67f098
......@@ -76,6 +76,7 @@ static void test_long_name(void)
WCHAR path[MAX_PATH];
GpStatus stat;
GpFontCollection *fonts;
HANDLE file;
INT num_families;
GpFontFamily *family, *cloned_family;
WCHAR family_name[LF_FACESIZE];
......@@ -86,8 +87,19 @@ static void test_long_name(void)
create_testfontfile(L"wine_longname.ttf", 1, path);
file = CreateFileW(path, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
ok(file != INVALID_HANDLE_VALUE, "CreateFileW failed: %ld\n", GetLastError());
stat = GdipPrivateAddFontFile(fonts, path);
ok(stat == Ok, "GdipPrivateAddFontFile failed: %d\n", stat);
todo_wine ok(stat == Ok, "GdipPrivateAddFontFile failed with open file handle: %d\n", stat);
CloseHandle(file);
if (stat != Ok) {
/* try again without opened file handle */
stat = GdipPrivateAddFontFile(fonts, path);
ok(stat == Ok, "GdipPrivateAddFontFile failed: %d\n", stat);
}
stat = GdipGetFontCollectionFamilyCount(fonts, &num_families);
ok(stat == Ok, "GdipGetFontCollectionFamilyCount failed: %d\n", stat);
......
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