Flutter Engine
 
Loading...
Searching...
No Matches
test_timeout_listener.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_TESTING_TEST_TIMEOUT_LISTENER_H_
6#define FLUTTER_TESTING_TEST_TIMEOUT_LISTENER_H_
7
8#include <memory>
9
10#include "flutter/fml/macros.h"
12#include "flutter/fml/thread.h"
14
15namespace flutter::testing {
16
17class PendingTests;
18
19class TestTimeoutListener : public ::testing::EmptyTestEventListener {
20 public:
21 explicit TestTimeoutListener(fml::TimeDelta timeout);
22
24
25 private:
26 const fml::TimeDelta timeout_;
27 fml::Thread listener_thread_;
28 fml::RefPtr<fml::TaskRunner> listener_thread_runner_;
29 std::shared_ptr<PendingTests> pending_tests_;
30
31 // |testing::EmptyTestEventListener|
32 void OnTestStart(const ::testing::TestInfo& test_info) override;
33
34 // |testing::EmptyTestEventListener|
35 void OnTestEnd(const ::testing::TestInfo& test_info) override;
36
38};
39
40} // namespace flutter::testing
41
42#endif // FLUTTER_TESTING_TEST_TIMEOUT_LISTENER_H_
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27