diff --git a/shell/common/fixtures/shell_test.dart b/shell/common/fixtures/shell_test.dart index 408e53bf7a713..aa344508723c8 100644 --- a/shell/common/fixtures/shell_test.dart +++ b/shell/common/fixtures/shell_test.dart @@ -25,6 +25,7 @@ void reportTimingsMain() { } } nativeReportTimingsCallback(timestamps); + PlatformDispatcher.instance.onReportTimings = (List timings) {}; }; } diff --git a/shell/common/shell_unittests.cc b/shell/common/shell_unittests.cc index 00f2c49b18a6b..7e832aaa897ba 100644 --- a/shell/common/shell_unittests.cc +++ b/shell/common/shell_unittests.cc @@ -534,8 +534,7 @@ static void CheckFrameTimings(const std::vector& timings, } } -// TODO(43192): This test is disable because of flakiness. -TEST_F(ShellTest, DISABLED_ReportTimingsIsCalled) { +TEST_F(ShellTest, ReportTimingsIsCalled) { fml::TimePoint start = fml::TimePoint::Now(); auto settings = CreateSettingsForFixture(); std::unique_ptr shell = CreateShell(settings); @@ -551,6 +550,7 @@ TEST_F(ShellTest, DISABLED_ReportTimingsIsCalled) { auto nativeTimingCallback = [&reportLatch, ×tamps](Dart_NativeArguments args) { Dart_Handle exception = nullptr; + ASSERT_EQ(timestamps.size(), 0ul); timestamps = tonic::DartConverter>::FromArguments( args, 0, exception); reportLatch.Signal(); @@ -1277,6 +1277,7 @@ TEST_F(ShellTest, ReportTimingsIsCalledImmediatelyAfterTheFirstFrame) { auto nativeTimingCallback = [&reportLatch, ×tamps](Dart_NativeArguments args) { Dart_Handle exception = nullptr; + ASSERT_EQ(timestamps.size(), 0ul); timestamps = tonic::DartConverter>::FromArguments( args, 0, exception); reportLatch.Signal();