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.
feedback: Add skeleton and build plumbing for help content provider
- Adds backend class skeleton - Adds simple unit test - Add build plumbing for tests and code Bug: b:185624798 Test: ash_webui_unittests --gtest_filter="HelpContentProviderTest.*" Change-Id: Iea87eb1588eea5d3734bc1fdf7d332723d3cf72f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3451178 Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org> Commit-Queue: Xiangdong Kong <xiangdongkong@google.com> Cr-Commit-Position: refs/heads/main@{#969789}
- Loading branch information
xiangdong kong
authored and
Chromium LUCI CQ
committed
Feb 11, 2022
1 parent
013178d
commit 75498d6
Showing
6 changed files
with
90 additions
and
0 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 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,28 @@ | ||
# Copyright 2022 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. | ||
|
||
import("//build/config/chromeos/ui_mode.gni") | ||
|
||
assert(is_chromeos_ash, "Non-ChromeOS builds cannot depend on //ash") | ||
|
||
static_library("backend") { | ||
sources = [ | ||
"help_content_provider.cc", | ||
"help_content_provider.h", | ||
] | ||
|
||
deps = [] | ||
} | ||
|
||
source_set("unit_tests") { | ||
testonly = true | ||
|
||
sources = [ "help_content_provider_unittest.cc" ] | ||
|
||
deps = [ | ||
":backend", | ||
"//base/test:test_support", | ||
"//testing/gtest", | ||
] | ||
} |
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,14 @@ | ||
// Copyright 2022 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. | ||
|
||
#include "ash/webui/os_feedback_ui/backend/help_content_provider.h" | ||
|
||
namespace ash { | ||
namespace feedback { | ||
|
||
HelpContentProvider::HelpContentProvider() = default; | ||
HelpContentProvider::~HelpContentProvider() = default; | ||
|
||
} // namespace feedback | ||
} // namespace ash |
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,22 @@ | ||
// Copyright 2022 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 ASH_WEBUI_OS_FEEDBACK_UI_BACKEND_HELP_CONTENT_PROVIDER_H_ | ||
#define ASH_WEBUI_OS_FEEDBACK_UI_BACKEND_HELP_CONTENT_PROVIDER_H_ | ||
|
||
namespace ash { | ||
namespace feedback { | ||
|
||
class HelpContentProvider { | ||
public: | ||
HelpContentProvider(); | ||
HelpContentProvider(const HelpContentProvider&) = delete; | ||
HelpContentProvider& operator=(const HelpContentProvider&) = delete; | ||
~HelpContentProvider(); | ||
}; | ||
|
||
} // namespace feedback | ||
} // namespace ash | ||
|
||
#endif // ASH_WEBUI_OS_FEEDBACK_UI_BACKEND_HELP_CONTENT_PROVIDER_H_ |
24 changes: 24 additions & 0 deletions
24
ash/webui/os_feedback_ui/backend/help_content_provider_unittest.cc
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,24 @@ | ||
// Copyright 2022 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. | ||
|
||
#include "ash/webui/os_feedback_ui/backend/help_content_provider.h" | ||
|
||
#include "testing/gtest/include/gtest/gtest.h" | ||
|
||
namespace ash { | ||
namespace feedback { | ||
|
||
class HelpContentProviderTest : public testing::Test { | ||
public: | ||
HelpContentProviderTest() = default; | ||
~HelpContentProviderTest() override = default; | ||
}; | ||
|
||
TEST_F(HelpContentProviderTest, DummyTest) { | ||
HelpContentProvider provider; | ||
EXPECT_TRUE(true); | ||
} | ||
|
||
} // namespace feedback | ||
} // namespace ash |