[COMDLG32_WINETEST] Sync with Wine Staging 3.9. CORE-14656

This commit is contained in:
Amine Khaldi 2018-05-27 04:07:12 +01:00
parent f68b0c5100
commit 234f89c07b

View file

@ -943,29 +943,27 @@ static void test_resizable2(void)
ofn.hInstance = GetModuleHandleA(NULL); ofn.hInstance = GetModuleHandleA(NULL);
ofn.lpTemplateName = "template1"; ofn.lpTemplateName = "template1";
ofn.Flags = OFN_EXPLORER; ofn.Flags = OFN_EXPLORER;
#define ISSIZABLE TRUE
ret = GetOpenFileNameA(&ofn); ret = GetOpenFileNameA(&ofn);
ok( ret == ISSIZABLE, "File Dialog should have been sizable\n"); ok( ret == TRUE, "File Dialog should have been sizable\n");
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATE; ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATE;
ret = GetOpenFileNameA(&ofn); ret = GetOpenFileNameA(&ofn);
ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); ok( !ret, "File Dialog should NOT have been sizable\n");
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATEHANDLE; ofn.Flags = OFN_EXPLORER | OFN_ENABLETEMPLATEHANDLE;
ofn.hInstance = LoadResource( GetModuleHandleA(NULL), FindResourceA( GetModuleHandleA(NULL), "template1", (LPSTR)RT_DIALOG)); ofn.hInstance = LoadResource( GetModuleHandleA(NULL), FindResourceA( GetModuleHandleA(NULL), "template1", (LPSTR)RT_DIALOG));
ofn.lpTemplateName = NULL; ofn.lpTemplateName = NULL;
ret = GetOpenFileNameA(&ofn); ret = GetOpenFileNameA(&ofn);
ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); ok( !ret, "File Dialog should NOT have been sizable\n");
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK; ofn.Flags = OFN_EXPLORER | OFN_ENABLEHOOK;
ret = GetOpenFileNameA(&ofn); ret = GetOpenFileNameA(&ofn);
ok( ret != ISSIZABLE, "File Dialog should NOT have been sizable\n"); ok( !ret, "File Dialog should NOT have been sizable\n");
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "CommDlgExtendedError returned %#x\n", ret);
#undef ISSIZABLE
} }
static void test_mru(void) static void test_mru(void)
@ -1032,8 +1030,6 @@ static UINT_PTR WINAPI test_extension_wndproc(HWND dlg, UINT msg, WPARAM wParam,
return FALSE; return FALSE;
} }
#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
static void test_extension_helper(OPENFILENAMEA* ofn, const char *filter, static void test_extension_helper(OPENFILENAMEA* ofn, const char *filter,
const char *expected_filename) const char *expected_filename)
{ {