Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::testing::TestTimeoutListener Class Reference

#include <test_timeout_listener.h>

Inheritance diagram for flutter::testing::TestTimeoutListener:

Public Member Functions

 TestTimeoutListener (fml::TimeDelta timeout)
 
 ~TestTimeoutListener ()
 

Detailed Description

Definition at line 20 of file test_timeout_listener.h.

Constructor & Destructor Documentation

◆ TestTimeoutListener()

flutter::testing::TestTimeoutListener::TestTimeoutListener ( fml::TimeDelta  timeout)
explicit

Definition at line 71 of file test_timeout_listener.cc.

72 : timeout_(timeout),
73 listener_thread_("test_timeout_listener"),
74 listener_thread_runner_(listener_thread_.GetTaskRunner()),
75 pending_tests_(PendingTests::Create(listener_thread_runner_, timeout_)) {
76 FML_LOG(INFO) << "Test timeout of " << timeout_.ToSeconds()
77 << " seconds per test case will be enforced.";
78}
static std::shared_ptr< PendingTests > Create(fml::RefPtr< fml::TaskRunner > host_task_runner, fml::TimeDelta timeout)
fml::RefPtr< fml::TaskRunner > GetTaskRunner() const
Definition: thread.cc:164
constexpr int64_t ToSeconds() const
Definition: time_delta.h:64
#define FML_LOG(severity)
Definition: logging.h:82
def timeout(deadline, cmd)

◆ ~TestTimeoutListener()

flutter::testing::TestTimeoutListener::~TestTimeoutListener ( )

Definition at line 80 of file test_timeout_listener.cc.

80 {
81 listener_thread_runner_->PostTask(
82 [tests = std::move(pending_tests_)]() mutable { tests.reset(); });
83 FML_CHECK(pending_tests_ == nullptr);
84}
static BlurTest tests[]
Definition: BlurTest.cpp:84
virtual void PostTask(const fml::closure &task) override
Definition: task_runner.cc:24
#define FML_CHECK(condition)
Definition: logging.h:85

The documentation for this class was generated from the following files: