Skip to content

Commit

Permalink
[tests] Use distinct begin and end times (#14361)
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Dec 12, 2019
1 parent fc8cafb commit 9bafb3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions shell/common/shell_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <future>
#define FML_USED_ON_EMBEDDER

#include "flutter/shell/common/shell_test.h"
Expand Down Expand Up @@ -159,8 +158,10 @@ void ShellTest::PumpOneFrame(Shell* shell,
shell->GetTaskRunners().GetUITaskRunner()->PostTask(
[&latch, engine = shell->weak_engine_, viewport_metrics]() {
engine->SetViewportMetrics(std::move(viewport_metrics));
engine->animator_->BeginFrame(fml::TimePoint::Now(),
fml::TimePoint::Now());
const auto frame_begin_time = fml::TimePoint::Now();
const auto frame_end_time =
frame_begin_time + fml::TimeDelta::FromSecondsF(1.0 / 60.0);
engine->animator_->BeginFrame(frame_begin_time, frame_end_time);
latch.Signal();
});
latch.Wait();
Expand Down

0 comments on commit 9bafb3c

Please sign in to comment.