webrtc/modules/utility/include/mock/mock_process_thread.h
Danil Chapovalov 14273de88b Make ProcessThread be a TaskQueue implementation
That would allow to switch components from relying on ProcessThreads to
relying on TaskQueue one by one, without introducing new threads.

Bug: webrtc:6289
Change-Id: I18fe5d679d4d4d0ddf4a11900c9814eb570284d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/167533
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30631}
2020-02-27 14:29:03 +00:00

41 lines
1.4 KiB
C++

/*
* Copyright (c) 2014 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 MODULES_UTILITY_INCLUDE_MOCK_MOCK_PROCESS_THREAD_H_
#define MODULES_UTILITY_INCLUDE_MOCK_MOCK_PROCESS_THREAD_H_
#include <memory>
#include "modules/utility/include/process_thread.h"
#include "rtc_base/location.h"
#include "test/gmock.h"
namespace webrtc {
class MockProcessThread : public ProcessThread {
public:
MOCK_METHOD(void, Start, (), (override));
MOCK_METHOD(void, Stop, (), (override));
MOCK_METHOD(void, Delete, (), (override));
MOCK_METHOD(void, WakeUp, (Module*), (override));
MOCK_METHOD(void, PostTask, (std::unique_ptr<QueuedTask>), (override));
MOCK_METHOD(void,
PostDelayedTask,
(std::unique_ptr<QueuedTask>, uint32_t),
(override));
MOCK_METHOD(void,
RegisterModule,
(Module*, const rtc::Location&),
(override));
MOCK_METHOD(void, DeRegisterModule, (Module*), (override));
};
} // namespace webrtc
#endif // MODULES_UTILITY_INCLUDE_MOCK_MOCK_PROCESS_THREAD_H_