Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ff4ae3c

Browse files
author
Kaushik Iska
committed
[tests] Use distinct begin and end times
1 parent 2713225 commit ff4ae3c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

shell/common/shell_test.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
#include <future>
65
#define FML_USED_ON_EMBEDDER
76

7+
#include <future>
8+
89
#include "flutter/shell/common/shell_test.h"
910

1011
#include "flutter/flow/layers/layer_tree.h"
@@ -159,8 +160,10 @@ void ShellTest::PumpOneFrame(Shell* shell,
159160
shell->GetTaskRunners().GetUITaskRunner()->PostTask(
160161
[&latch, engine = shell->weak_engine_, viewport_metrics]() {
161162
engine->SetViewportMetrics(std::move(viewport_metrics));
162-
engine->animator_->BeginFrame(fml::TimePoint::Now(),
163-
fml::TimePoint::Now());
163+
const auto frame_begin_time = fml::TimePoint::Now();
164+
const auto frame_end_time =
165+
frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0);
166+
engine->animator_->BeginFrame(frame_begin_time, frame_end_time);
164167
latch.Signal();
165168
});
166169
latch.Wait();

0 commit comments

Comments
 (0)