diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index b0db27accb8..9dd00520f87 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -723,6 +723,7 @@ static void test_parsedescriptor(void) }; FOURCC empty[] = {FOURCC_RIFF, ~0, 0}; FOURCC inam[] = {FOURCC_RIFF, ~0, FOURCC_LIST, ~0, mmioFOURCC('I','N','A','M'), 0, 0}; + FOURCC noriff[] = {mmioFOURCC('J','U','N','K'), 0}; #define X(class) &CLSID_ ## class, #class #define Y(form) form, #form const struct { @@ -808,6 +809,19 @@ static void test_parsedescriptor(void) ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData); IStream_Release(stream); + /* Not a RIFF stream */ + stream = gen_riff_stream(noriff); + memset(&desc, 0, sizeof(desc)); + desc.dwSize = sizeof(desc); + hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc); + if (forms[i].needs_size) + ok(hr == DMUS_E_CHUNKNOTFOUND, + "ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr); + else + ok(hr == E_FAIL, "ParseDescriptor failed: %08x, expected E_FAIL\n", hr); + ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData); + IStream_Release(stream); + /* All desc chunks */ alldesc[1] = forms[i].form; stream = gen_riff_stream(alldesc);