27 MockIndirectObjectHolder mock_holder;
30 EXPECT_CALL(mock_holder, ParseIndirectObject(::testing::_))
31 .WillOnce(::testing::WithArg<0>(::testing::Invoke(
32 [&mock_holder](uint32_t objnum) -> RetainPtr<CPDF_Object> {
33 RetainPtr<
const CPDF_Object> same_parse =
34 mock_holder.GetOrParseIndirectObject(objnum);
36 return pdfium::MakeRetain<CPDF_Null>();
43 static constexpr uint32_t kObjNum = 1000;
44 MockIndirectObjectHolder mock_holder;
46 EXPECT_CALL(mock_holder, ParseIndirectObject(::testing::_)).Times(0);
48 ::testing::Mock::VerifyAndClearExpectations(&mock_holder);
50 EXPECT_CALL(mock_holder, ParseIndirectObject(::testing::_))
51 .WillOnce(::testing::WithArg<0>(
52 ::testing::Invoke([](uint32_t objnum) -> RetainPtr<CPDF_Object> {
53 return pdfium::MakeRetain<CPDF_Null>();
56 ::testing::Mock::VerifyAndClearExpectations(&mock_holder);
58 EXPECT_CALL(mock_holder, ParseIndirectObject(::testing::_)).Times(0);
60 ::testing::Mock::VerifyAndClearExpectations(&mock_holder);