modify security comnponent unit test

Signed-off-by: libing23 <libing23@huawei.com>
This commit is contained in:
libing23 2023-07-25 18:10:11 +08:00
parent 0031606ce7
commit 3769484b66
6 changed files with 12 additions and 6 deletions

View File

@ -88,12 +88,12 @@ foreach(item, ace_platforms) {
part_name = ace_engine_part
testonly = true
sources = [
"$ace_root/frameworks/base/test/mock/mock_ace_container.cpp",
"$ace_root/frameworks/base/test/mock/mock_download_manager.cpp",
"$ace_root/frameworks/base/test/mock/mock_drag_window_old.cpp",
"$ace_root/frameworks/core/common/test/mock/mock_ace_application_info.cpp",
"$ace_root/frameworks/core/components/test/mock/mock_resource_adapter.cpp",
"$ace_root/frameworks/core/components/test/unittest/mock/subwindow_mock.cpp",
"$ace_root/test/mock/adapter/mock_ace_container.cpp",
]
if (is_ohos_standard_system) {
@ -118,7 +118,11 @@ foreach(item, ace_platforms) {
"//third_party/googletest:gtest_main",
]
external_deps = [ "c_utils:utils" ]
external_deps = [
"ability_runtime:abilitykit_native",
"c_utils:utils",
"napi:ace_napi",
]
}
}
}

View File

@ -55,7 +55,6 @@ ohos_unittest("CardFrontendTest") {
]
sources += [
"$ace_root/test/mock/adapter/mock_ace_container.cpp",
"$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp",
"$ace_root/test/mock/core/common/mock_udmf.cpp",
]

View File

@ -50,7 +50,6 @@ ohos_unittest("CommonEventTest") {
part_name = ace_engine_part
sources += [
"$ace_root/test/mock/adapter/mock_ace_container.cpp",
"$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp",
"$ace_root/test/mock/core/common/mock_udmf.cpp",
]

View File

@ -80,7 +80,6 @@ ohos_unittest("ManifestParserTest") {
]
sources += [
"$ace_root/test/mock/adapter/mock_ace_container.cpp",
"$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp",
"$ace_root/test/mock/core/common/mock_udmf.cpp",
]

View File

@ -51,7 +51,6 @@ ohos_unittest("custom_paint_test_ng") {
]
sources += [
"$ace_root/test/mock/adapter/mock_ace_container.cpp",
"$ace_root/test/mock/adapter/mock_mmi_event_convertor.cpp",
"$ace_root/test/mock/core/common/mock_udmf.cpp",
]

View File

@ -20,4 +20,10 @@ sptr<IRemoteObject> AceContainer::GetToken()
{
return token_;
}
std::shared_ptr<AbilityRuntime::Context> AceContainer::GetAbilityContextByModule(
const std::string& bundle, const std::string& module)
{
return nullptr;
}
} // namespace OHOS::Ace::Platform