Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec1e1f61 authored by Qoo Lin's avatar Qoo Lin Committed by Automerger Merge Worker
Browse files

Fix SetBadMetadata fail am: 2ff704a6

parents 2a397228 2ff704a6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2001,6 +2001,11 @@ TEST_P(GraphicsMapperHidlTest, SetBadMetadata) {
              mGralloc->set(bufferHandle, gralloc4::MetadataType_Dataspace, vec));
    ASSERT_EQ(Error::UNSUPPORTED,
              mGralloc->set(bufferHandle, gralloc4::MetadataType_BlendMode, vec));

    // Keep optional metadata types below and populate the encoded metadata vec
    // with some arbitrary different metadata because the common gralloc4::decode*()
    // functions do not distinguish between an empty vec and bad value.
    ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
    ASSERT_EQ(Error::UNSUPPORTED,
              mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
    ASSERT_EQ(Error::UNSUPPORTED,