Commit 7bac9a02 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite/tests: Some tests for system font set.

parent f85def77
......@@ -2291,7 +2291,9 @@ static void test_system_fontcollection(void)
hr = IDWriteFontCollection_QueryInterface(collection, &IID_IDWriteFontCollection1, (void**)&collection1);
if (hr == S_OK) {
IDWriteFontSet *fontset, *fontset2;
IDWriteFontFamily1 *family1;
IDWriteFactory3 *factory3;
hr = IDWriteFontCollection1_QueryInterface(collection1, &IID_IDWriteFontCollection, (void**)&coll2);
ok(hr == S_OK, "got 0x%08x\n", hr);
......@@ -2306,6 +2308,39 @@ static void test_system_fontcollection(void)
hr = IDWriteFontCollection1_GetFontFamily(collection1, 0, &family1);
ok(hr == S_OK, "got 0x%08x\n", hr);
IDWriteFontFamily1_Release(family1);
/* system fontset */
EXPECT_REF(collection1, 2);
EXPECT_REF(factory, 2);
hr = IDWriteFontCollection1_GetFontSet(collection1, &fontset);
todo_wine
ok(hr == S_OK, "Failed to get fontset, hr %#x.\n", hr);
if (hr == S_OK) {
EXPECT_REF(collection1, 2);
EXPECT_REF(factory, 2);
EXPECT_REF(fontset, 1);
hr = IDWriteFontCollection1_GetFontSet(collection1, &fontset2);
ok(hr == S_OK, "Failed to get fontset, hr %#x.\n", hr);
ok(fontset != fontset2, "Expected new fontset instance.\n");
EXPECT_REF(fontset2, 1);
IDWriteFontSet_Release(fontset2);
hr = IDWriteFactory_QueryInterface(factory, &IID_IDWriteFactory3, (void **)&factory3);
ok(hr == S_OK, "Failed to get IDWriteFactory3 interface, hr %#x.\n", hr);
EXPECT_REF(factory, 3);
hr = IDWriteFactory3_GetSystemFontSet(factory3, &fontset2);
ok(hr == S_OK, "Failed to get system font set, hr %#x.\n", hr);
ok(fontset != fontset2, "Expected new fontset instance.\n");
EXPECT_REF(fontset2, 1);
EXPECT_REF(factory, 4);
IDWriteFontSet_Release(fontset2);
IDWriteFontSet_Release(fontset);
IDWriteFactory3_Release(factory3);
}
IDWriteFontCollection1_Release(collection1);
}
else
......
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