tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mock_task_queue_base.h (1403B)


      1 /*
      2 *  Copyright 2022 The WebRTC Project Authors. All rights reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_
     12 #define API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_
     13 
     14 #include "absl/functional/any_invocable.h"
     15 #include "api/location.h"
     16 #include "api/task_queue/task_queue_base.h"
     17 #include "api/units/time_delta.h"
     18 #include "test/gmock.h"
     19 
     20 namespace webrtc {
     21 
     22 class MockTaskQueueBase : public TaskQueueBase {
     23 public:
     24  using TaskQueueBase::PostDelayedTaskTraits;
     25  using TaskQueueBase::PostTaskTraits;
     26 
     27  MOCK_METHOD(void, Delete, (), (override));
     28  MOCK_METHOD(void,
     29              PostTaskImpl,
     30              (absl::AnyInvocable<void() &&>,
     31               const PostTaskTraits&,
     32               const Location&),
     33              (override));
     34  MOCK_METHOD(void,
     35              PostDelayedTaskImpl,
     36              (absl::AnyInvocable<void() &&>,
     37               TimeDelta,
     38               const PostDelayedTaskTraits&,
     39               const Location&),
     40              (override));
     41 };
     42 
     43 }  // namespace webrtc
     44 
     45 #endif  // API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_