2022-01-26 18:38:13 +01:00
|
|
|
/*
|
|
|
|
|
* Copyright 2022 The WebRTC Project Authors. All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_
|
|
|
|
|
#define API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_
|
|
|
|
|
|
2022-07-19 13:07:12 +02:00
|
|
|
#include "absl/functional/any_invocable.h"
|
2022-01-26 18:38:13 +01:00
|
|
|
#include "api/task_queue/task_queue_base.h"
|
2022-07-19 13:07:12 +02:00
|
|
|
#include "api/units/time_delta.h"
|
2022-01-26 18:38:13 +01:00
|
|
|
#include "test/gmock.h"
|
|
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
class MockTaskQueueBase : public TaskQueueBase {
|
|
|
|
|
public:
|
2023-03-01 10:13:28 +01:00
|
|
|
using TaskQueueBase::PostDelayedTaskTraits;
|
|
|
|
|
using TaskQueueBase::PostTaskTraits;
|
|
|
|
|
|
2022-07-19 13:07:12 +02:00
|
|
|
MOCK_METHOD(void, Delete, (), (override));
|
|
|
|
|
MOCK_METHOD(void,
|
2023-03-01 10:13:28 +01:00
|
|
|
PostTaskImpl,
|
|
|
|
|
(absl::AnyInvocable<void() &&>,
|
|
|
|
|
const PostTaskTraits&,
|
|
|
|
|
const Location&),
|
2022-07-19 13:07:12 +02:00
|
|
|
(override));
|
|
|
|
|
MOCK_METHOD(void,
|
2023-03-01 10:13:28 +01:00
|
|
|
PostDelayedTaskImpl,
|
|
|
|
|
(absl::AnyInvocable<void() &&>,
|
|
|
|
|
TimeDelta,
|
|
|
|
|
const PostDelayedTaskTraits&,
|
|
|
|
|
const Location&),
|
2022-07-19 13:07:12 +02:00
|
|
|
(override));
|
2022-01-26 18:38:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace webrtc
|
|
|
|
|
|
|
|
|
|
#endif // API_TASK_QUEUE_TEST_MOCK_TASK_QUEUE_BASE_H_
|