Skip to content

Commit 428ef10

Browse files
authored
deflake (flutter#25864)
1 parent d1f31c7 commit 428ef10

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

shell/common/fixtures/shell_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ void reportTimingsMain() {
2525
}
2626
}
2727
nativeReportTimingsCallback(timestamps);
28+
PlatformDispatcher.instance.onReportTimings = (List<FrameTiming> timings) {};
2829
};
2930
}
3031

shell/common/shell_unittests.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,7 @@ static void CheckFrameTimings(const std::vector<FrameTiming>& timings,
534534
}
535535
}
536536

537-
// TODO(43192): This test is disable because of flakiness.
538-
TEST_F(ShellTest, DISABLED_ReportTimingsIsCalled) {
537+
TEST_F(ShellTest, ReportTimingsIsCalled) {
539538
fml::TimePoint start = fml::TimePoint::Now();
540539
auto settings = CreateSettingsForFixture();
541540
std::unique_ptr<Shell> shell = CreateShell(settings);
@@ -551,6 +550,7 @@ TEST_F(ShellTest, DISABLED_ReportTimingsIsCalled) {
551550
auto nativeTimingCallback = [&reportLatch,
552551
&timestamps](Dart_NativeArguments args) {
553552
Dart_Handle exception = nullptr;
553+
ASSERT_EQ(timestamps.size(), 0ul);
554554
timestamps = tonic::DartConverter<std::vector<int64_t>>::FromArguments(
555555
args, 0, exception);
556556
reportLatch.Signal();
@@ -1277,6 +1277,7 @@ TEST_F(ShellTest, ReportTimingsIsCalledImmediatelyAfterTheFirstFrame) {
12771277
auto nativeTimingCallback = [&reportLatch,
12781278
&timestamps](Dart_NativeArguments args) {
12791279
Dart_Handle exception = nullptr;
1280+
ASSERT_EQ(timestamps.size(), 0ul);
12801281
timestamps = tonic::DartConverter<std::vector<int64_t>>::FromArguments(
12811282
args, 0, exception);
12821283
reportLatch.Signal();

0 commit comments

Comments
 (0)