Skip to content

Commit fa2ff84

Browse files
loic-sharmaOleh
authored andcommitted
Remove noisy log from startup (flutter#35954)
1 parent e1f7190 commit fa2ff84

2 files changed

Lines changed: 26 additions & 6 deletions

File tree

shell/platform/embedder/embedder.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ static bool IsOpenGLRendererConfigValid(const FlutterRendererConfig* config) {
132132
return false;
133133
}
134134

135-
if (!SAFE_EXISTS(open_gl_config, populate_existing_damage)) {
136-
FML_LOG(INFO) << "populate_existing_damage was not defined, disabling "
137-
"partial repaint. If you wish to enable partial repaint, "
138-
"please define this callback.";
139-
}
140-
141135
return true;
142136
}
143137

shell/platform/windows/flutter_windows_unittests.cc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,32 @@ TEST_F(WindowsTest, LaunchMain) {
3838
ASSERT_NE(controller, nullptr);
3939
}
4040

41+
// Verify there is no unexpected output from launching main.
42+
TEST_F(WindowsTest, LaunchMainHasNoOutput) {
43+
// Replace stdout & stderr stream buffers with our own.
44+
std::stringstream cout_buffer;
45+
std::stringstream cerr_buffer;
46+
std::streambuf* old_cout_buffer = std::cout.rdbuf();
47+
std::streambuf* old_cerr_buffer = std::cerr.rdbuf();
48+
std::cout.rdbuf(cout_buffer.rdbuf());
49+
std::cerr.rdbuf(cerr_buffer.rdbuf());
50+
51+
auto& context = GetContext();
52+
WindowsConfigBuilder builder(context);
53+
ViewControllerPtr controller{builder.Run()};
54+
ASSERT_NE(controller, nullptr);
55+
56+
// Restore original stdout & stderr stream buffer.
57+
std::cout.rdbuf(old_cout_buffer);
58+
std::cerr.rdbuf(old_cerr_buffer);
59+
60+
// Verify stdout & stderr have no output.
61+
std::string cout = cout_buffer.str();
62+
std::string cerr = cerr_buffer.str();
63+
EXPECT_TRUE(cout.empty());
64+
EXPECT_TRUE(cerr.empty());
65+
}
66+
4167
// Verify we can successfully launch a custom entry point.
4268
TEST_F(WindowsTest, LaunchCustomEntrypoint) {
4369
auto& context = GetContext();

0 commit comments

Comments
 (0)