@@ -89,6 +89,7 @@ class DirectionalGaussianBlurFilterContentsTest : public ::testing::Test {
89
89
.WillRepeatedly (Invoke (([](const TextureDescriptor& desc) {
90
90
auto result = std::make_shared<MockTexture>(desc);
91
91
EXPECT_CALL (*result, IsValid ()).WillRepeatedly (Return (true ));
92
+ EXPECT_CALL (*result, GetSize ()).WillRepeatedly (Return (desc.size ));
92
93
return result;
93
94
})));
94
95
}
@@ -174,11 +175,22 @@ TEST_F(DirectionalGaussianBlurFilterContentsTest, RenderSomething) {
174
175
ContentContext renderer (mock_context_, mock_typographer_context_,
175
176
mock_render_target_allocator_);
176
177
Entity entity;
177
- Rect coverage_hint = Rect::MakeLTRB (0 , 0 , 0 , 0 );
178
178
std::optional<Entity> result =
179
- contents->GetEntity (renderer, entity, coverage_hint);
179
+ contents->GetEntity (renderer, entity, /* coverage_hint= */ {} );
180
180
ASSERT_TRUE (result.has_value ());
181
- ASSERT_EQ (result.value ().GetBlendMode (), BlendMode::kSourceOver );
181
+ EXPECT_EQ (result.value ().GetBlendMode (), BlendMode::kSourceOver );
182
+ std::optional<Rect > result_coverage = result.value ().GetCoverage ();
183
+ std::optional<Rect > contents_coverage = contents->GetCoverage (entity);
184
+ EXPECT_TRUE (result_coverage.has_value ());
185
+ EXPECT_TRUE (contents_coverage.has_value ());
186
+ EXPECT_NEAR (result_coverage.value ().GetLeft (),
187
+ contents_coverage.value ().GetLeft (), kEhCloseEnough );
188
+ EXPECT_NEAR (result_coverage.value ().GetTop (),
189
+ contents_coverage.value ().GetTop (), kEhCloseEnough );
190
+ EXPECT_NEAR (result_coverage.value ().GetRight (),
191
+ contents_coverage.value ().GetRight (), kEhCloseEnough );
192
+ EXPECT_NEAR (result_coverage.value ().GetBottom (),
193
+ contents_coverage.value ().GetBottom (), kEhCloseEnough );
182
194
}
183
195
184
196
} // namespace testing
0 commit comments