• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2018 The Chromium 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 TOOLS_GN_TEST_WITH_SCHEDULER_H_
6 #define TOOLS_GN_TEST_WITH_SCHEDULER_H_
7 
8 #include "gn/scheduler.h"
9 #include "util/msg_loop.h"
10 #include "util/test/test.h"
11 
12 class TestWithScheduler : public testing::Test {
13  protected:
14   TestWithScheduler();
15   ~TestWithScheduler() override;
16 
scheduler()17   Scheduler& scheduler() { return scheduler_; }
18 
19  private:
20   MsgLoop run_loop_;
21   Scheduler scheduler_;
22 
23   TestWithScheduler(const TestWithScheduler&) = delete;
24   TestWithScheduler& operator=(const TestWithScheduler&) = delete;
25 };
26 
27 #endif  // TOOLS_GN_TEST_WITH_SCHEDULER_H_
28