forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move mock_logger to components/media_router/common/test
This CL moves mock_logger.* from chrome/browser/ to components/ so that it can be reused by mirroring service tests in components/ directory. Mirroring service tests will be changed in a later CL. Bug: b/165366974, 1117673 Change-Id: I225de779b0caa476fd253b56e0ecc10f16e13688 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2482092 Reviewed-by: Takumi Fujimoto <takumif@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Commit-Queue: Muyao Xu <muyaoxu@google.com> Cr-Commit-Position: refs/heads/master@{#820315}
- Loading branch information
Showing
7 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
include_rules = [ | ||
"+url", | ||
"+mojo", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright 2020 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef COMPONENTS_MEDIA_ROUTER_COMMON_TEST_MOCK_LOGGER_H_ | ||
#define COMPONENTS_MEDIA_ROUTER_COMMON_TEST_MOCK_LOGGER_H_ | ||
|
||
#include "components/media_router/common/mojom/logger.mojom.h" | ||
#include "mojo/public/cpp/bindings/pending_remote.h" | ||
#include "mojo/public/cpp/bindings/receiver.h" | ||
#include "testing/gmock/include/gmock/gmock.h" | ||
#include "testing/gtest/include/gtest/gtest.h" | ||
|
||
namespace media_router { | ||
|
||
class MockLogger : public media_router::mojom::Logger { | ||
public: | ||
MockLogger(); | ||
~MockLogger() override; | ||
|
||
MOCK_METHOD6(LogInfo, | ||
void(media_router::mojom::LogCategory, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&)); | ||
MOCK_METHOD6(LogWarning, | ||
void(media_router::mojom::LogCategory, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&)); | ||
MOCK_METHOD6(LogError, | ||
void(media_router::mojom::LogCategory, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&, | ||
const std::string&)); | ||
|
||
private: | ||
mojo::Receiver<media_router::mojom::Logger> receiver_{this}; | ||
}; | ||
} // namespace media_router | ||
|
||
#endif |