Skip to content

Commit

Permalink
Fix typo in embedder unit tests (flutter#23783)
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-simmons authored Jan 21, 2021
1 parent d4132ea commit 87960d8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool EmbedderTestCompositorGL::UpdateOffscrenComposition(
for (size_t i = 0; i < layers_count; ++i) {
const auto* layer = layers[i];

sk_sp<SkImage> platform_renderered_contents;
sk_sp<SkImage> platform_rendered_contents;

sk_sp<SkImage> layer_image;
SkIPoint canvas_offset = SkIPoint::Make(0, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool EmbedderTestCompositorSoftware::UpdateOffscrenComposition(
for (size_t i = 0; i < layers_count; ++i) {
const auto* layer = layers[i];

sk_sp<SkImage> platform_renderered_contents;
sk_sp<SkImage> platform_rendered_contents;

sk_sp<SkImage> layer_image;
SkIPoint canvas_offset = SkIPoint::Make(0, 0);
Expand Down
6 changes: 3 additions & 3 deletions shell/platform/embedder/tests/embedder_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ TEST_F(EmbedderTest, VerifyB143464703WithSoftwareBackend) {
kSuccess);
ASSERT_TRUE(engine.is_valid());

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

latch.Wait();

Expand All @@ -957,8 +957,8 @@ TEST_F(EmbedderTest, VerifyB143464703WithSoftwareBackend) {
#if !defined(OS_LINUX)
GTEST_SKIP() << "Skipping golden tests on non-Linux OSes";
#endif // OS_LINUX
ASSERT_TRUE(ImageMatchesFixture("verifyb143464703_soft_noxform.png",
renderered_scene));
ASSERT_TRUE(
ImageMatchesFixture("verifyb143464703_soft_noxform.png", rendered_scene));
}

TEST_F(EmbedderTest, CanSendLowMemoryNotification) {
Expand Down
40 changes: 20 additions & 20 deletions shell/platform/embedder/tests/embedder_unittests_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ TEST_F(EmbedderTest, CanRenderSceneWithoutCustomCompositor) {
builder.SetDartEntrypoint("can_render_scene_without_custom_compositor");
builder.SetOpenGLRendererConfig(SkISize::Make(800, 600));

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1186,7 +1186,7 @@ TEST_F(EmbedderTest, CanRenderSceneWithoutCustomCompositor) {
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("scene_without_custom_compositor.png",
renderered_scene));
rendered_scene));
}

TEST_F(EmbedderTest, CanRenderSceneWithoutCustomCompositorWithTransformation) {
Expand All @@ -1202,7 +1202,7 @@ TEST_F(EmbedderTest, CanRenderSceneWithoutCustomCompositorWithTransformation) {
builder.SetDartEntrypoint("can_render_scene_without_custom_compositor");
builder.SetOpenGLRendererConfig(SkISize::Make(600, 800));

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1219,7 +1219,7 @@ TEST_F(EmbedderTest, CanRenderSceneWithoutCustomCompositorWithTransformation) {
kSuccess);

ASSERT_TRUE(ImageMatchesFixture(
"scene_without_custom_compositor_with_xform.png", renderered_scene));
"scene_without_custom_compositor_with_xform.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithoutCompositor) {
Expand All @@ -1230,7 +1230,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithoutCompositor) {
builder.SetDartEntrypoint("render_gradient");
builder.SetOpenGLRendererConfig(SkISize::Make(800, 600));

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1244,7 +1244,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithoutCompositor) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithoutCompositorWithXform) {
Expand All @@ -1262,7 +1262,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithoutCompositorWithXform) {
builder.SetDartEntrypoint("render_gradient");
builder.SetOpenGLRendererConfig(surface_size);

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1277,7 +1277,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithoutCompositorWithXform) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithCompositor) {
Expand All @@ -1291,7 +1291,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositor) {
builder.SetRenderTargetType(
EmbedderTestBackingStoreProducer::RenderTargetType::kOpenGLFramebuffer);

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1305,7 +1305,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositor) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithCompositorWithXform) {
Expand All @@ -1327,7 +1327,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorWithXform) {
builder.SetRenderTargetType(
EmbedderTestBackingStoreProducer::RenderTargetType::kOpenGLFramebuffer);

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1342,7 +1342,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorWithXform) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayer) {
Expand Down Expand Up @@ -1433,7 +1433,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayer) {
return surface->makeImageSnapshot();
});

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1447,7 +1447,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayer) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient.png", rendered_scene));
}

TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayerWithXform) {
Expand Down Expand Up @@ -1546,7 +1546,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayerWithXform) {
return surface->makeImageSnapshot();
});

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -1561,7 +1561,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithCompositorOnNonRootLayerWithXform) {
ASSERT_EQ(FlutterEngineSendWindowMetricsEvent(engine.get(), &event),
kSuccess);

ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("gradient_xform.png", rendered_scene));
}

TEST_F(EmbedderTest, VerifyB141980393) {
Expand Down Expand Up @@ -1811,7 +1811,7 @@ TEST_F(EmbedderTest,

fml::CountDownLatch latch(1);

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

context.GetCompositor().SetNextPresentCallback(
[&](const FlutterLayer** layers, size_t layers_count) {
Expand Down Expand Up @@ -1884,7 +1884,7 @@ TEST_F(EmbedderTest,

latch.Wait();

ASSERT_TRUE(ImageMatchesFixture("dpr_noxform.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("dpr_noxform.png", rendered_scene));
}

TEST_F(
Expand All @@ -1905,7 +1905,7 @@ TEST_F(

context.SetRootSurfaceTransformation(root_surface_transformation);

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();
fml::CountDownLatch latch(1);

context.GetCompositor().SetNextPresentCallback(
Expand Down Expand Up @@ -1979,7 +1979,7 @@ TEST_F(

latch.Wait();

ASSERT_TRUE(ImageMatchesFixture("dpr_xform.png", renderered_scene));
ASSERT_TRUE(ImageMatchesFixture("dpr_xform.png", rendered_scene));
}

TEST_F(EmbedderTest,
Expand Down
4 changes: 2 additions & 2 deletions shell/platform/embedder/tests/embedder_unittests_metal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithMetal) {
builder.SetDartEntrypoint("render_gradient");
builder.SetMetalRendererConfig(SkISize::Make(800, 600));

auto renderered_scene = context.GetNextSceneImage();
auto rendered_scene = context.GetNextSceneImage();

auto engine = builder.LaunchEngine();
ASSERT_TRUE(engine.is_valid());
Expand All @@ -45,7 +45,7 @@ TEST_F(EmbedderTest, CanRenderGradientWithMetal) {

// TODO (https://github.com/flutter/flutter/issues/73590): re-enable once
// we are able to figure out why this fails on the bots.
// ASSERT_TRUE(ImageMatchesFixture("gradient_metal.png", renderered_scene));
// ASSERT_TRUE(ImageMatchesFixture("gradient_metal.png", rendered_scene));
}

} // namespace testing
Expand Down

0 comments on commit 87960d8

Please sign in to comment.