mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
!10723 [feature]abilitykitutils支持独立编译
Merge pull request !10723 from 张亚菲/zyfCompile
This commit is contained in:
@@ -270,6 +270,14 @@
|
||||
},
|
||||
"name": "//foundation/ability/ability_runtime/frameworks/native/ability/native:extensionkit_native"
|
||||
},
|
||||
{
|
||||
"header": {
|
||||
"header_base": "//foundation/ability/ability_runtime/interfaces/kits/native/ability/native/",
|
||||
"header_files": [
|
||||
]
|
||||
},
|
||||
"name": "//foundation/ability/ability_runtime/frameworks/native/ability/native:abilitykit_utils"
|
||||
},
|
||||
{
|
||||
"header": {
|
||||
"header_base": "//foundation/ability/ability_runtime/interfaces/kits/native/ability/native/",
|
||||
|
||||
@@ -137,12 +137,10 @@ ohos_shared_library("abilitykit_utils") {
|
||||
sources = [
|
||||
"${ability_runtime_native_path}/ability/native/ability_handler.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/ability_local_record.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/application_configuration_manager.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/configuration_utils.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/resource_config_helper.cpp",
|
||||
]
|
||||
|
||||
deps = []
|
||||
deps = [ ":configuration_helper" ]
|
||||
|
||||
configs = [ ":abilitykit_utils_exceptions" ]
|
||||
|
||||
@@ -190,6 +188,68 @@ ohos_shared_library("abilitykit_utils") {
|
||||
part_name = "ability_runtime"
|
||||
}
|
||||
|
||||
ohos_shared_library("configuration_helper") {
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
boundary_sanitize = true
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
cfi_vcall_icall_only = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app",
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include",
|
||||
"${ability_runtime_innerkits_path}/wantagent/include",
|
||||
"${ability_runtime_services_path}/abilitymgr/include",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"${ability_runtime_native_path}/ability/native/application_configuration_manager.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/resource_config_helper.cpp",
|
||||
]
|
||||
|
||||
deps = []
|
||||
|
||||
external_deps = [
|
||||
"ability_base:configuration",
|
||||
"ability_base:want",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"bundle_framework:appexecfwk_core",
|
||||
"c_utils:utils",
|
||||
"eventhandler:libeventhandler",
|
||||
"hilog:libhilog",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
"ipc:ipc_napi",
|
||||
"json:nlohmann_json_static",
|
||||
"jsoncpp:jsoncpp",
|
||||
"napi:ace_napi",
|
||||
"resource_management:global_resmgr",
|
||||
]
|
||||
|
||||
if (ability_runtime_graphics) {
|
||||
external_deps += [
|
||||
"ability_base:session_info",
|
||||
"graphic_2d:color_manager",
|
||||
"icu:shared_icuuc",
|
||||
"image_framework:image_native",
|
||||
"window_manager:libdm",
|
||||
"window_manager:libwm",
|
||||
"window_manager:libwmutil",
|
||||
]
|
||||
}
|
||||
|
||||
subsystem_name = "ability"
|
||||
part_name = "ability_runtime"
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitykit_native") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
@@ -241,6 +301,7 @@ ohos_shared_library("abilitykit_native") {
|
||||
]
|
||||
|
||||
deps = [
|
||||
":configuration_helper",
|
||||
":continuation_ipc",
|
||||
":extension_blocklist_config",
|
||||
":ui_service_extension_connection",
|
||||
@@ -377,6 +438,7 @@ config("extensionkit_public_config") {
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/app",
|
||||
"${ability_runtime_innerkits_path}/app_manager/include/appmgr",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
]
|
||||
|
||||
if (ability_runtime_graphics) {
|
||||
@@ -412,6 +474,7 @@ ohos_shared_library("extensionkit_native") {
|
||||
public_configs = [ ":extensionkit_public_config" ]
|
||||
|
||||
deps = [
|
||||
":configuration_helper",
|
||||
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
|
||||
"${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
|
||||
"${ability_runtime_innerkits_path}/runtime:runtime",
|
||||
@@ -546,6 +609,7 @@ ohos_shared_library("uiabilitykit_native") {
|
||||
|
||||
deps = [
|
||||
":abilitykit_native",
|
||||
":configuration_helper",
|
||||
":continuation_ipc",
|
||||
":ui_extension",
|
||||
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
|
||||
|
||||
@@ -19,8 +19,9 @@
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
AbilityLocalRecord::AbilityLocalRecord(const std::shared_ptr<AbilityInfo> &info, const sptr<IRemoteObject> &token)
|
||||
: abilityInfo_(info), token_(token) {}
|
||||
AbilityLocalRecord::AbilityLocalRecord(const std::shared_ptr<AbilityInfo> &info, const sptr<IRemoteObject> &token,
|
||||
const std::shared_ptr<AAFwk::Want> &want, int32_t abilityRecordId)
|
||||
: abilityInfo_(info), token_(token), want_(want), abilityRecordId_(abilityRecordId) {}
|
||||
|
||||
AbilityLocalRecord::~AbilityLocalRecord() {}
|
||||
|
||||
@@ -29,31 +30,16 @@ const std::shared_ptr<AbilityInfo> &AbilityLocalRecord::GetAbilityInfo()
|
||||
return abilityInfo_;
|
||||
}
|
||||
|
||||
const std::shared_ptr<EventHandler> &AbilityLocalRecord::GetEventHandler()
|
||||
{
|
||||
return handler_;
|
||||
}
|
||||
|
||||
void AbilityLocalRecord::SetEventHandler(const std::shared_ptr<EventHandler> &handler)
|
||||
{
|
||||
handler_ = handler;
|
||||
}
|
||||
|
||||
const std::shared_ptr<EventRunner> &AbilityLocalRecord::GetEventRunner()
|
||||
{
|
||||
return runner_;
|
||||
}
|
||||
|
||||
void AbilityLocalRecord::SetEventRunner(const std::shared_ptr<EventRunner> &runner)
|
||||
{
|
||||
runner_ = runner;
|
||||
}
|
||||
|
||||
const sptr<IRemoteObject> &AbilityLocalRecord::GetToken()
|
||||
{
|
||||
return token_;
|
||||
}
|
||||
|
||||
int32_t AbilityLocalRecord::GetAbilityRecordId() const
|
||||
{
|
||||
return abilityRecordId_;
|
||||
}
|
||||
|
||||
const sptr<AbilityThread> &AbilityLocalRecord::GetAbilityThread()
|
||||
{
|
||||
return abilityThread_;
|
||||
@@ -64,11 +50,6 @@ void AbilityLocalRecord::SetAbilityThread(const sptr<AbilityThread> &abilityThre
|
||||
abilityThread_ = abilityThread;
|
||||
}
|
||||
|
||||
void AbilityLocalRecord::SetWant(const std::shared_ptr<AAFwk::Want> &want)
|
||||
{
|
||||
want_ = want;
|
||||
}
|
||||
|
||||
const std::shared_ptr<AAFwk::Want> &AbilityLocalRecord::GetWant()
|
||||
{
|
||||
return want_;
|
||||
|
||||
@@ -239,8 +239,6 @@ void ExtensionAbilityThread::HandleAttach(const std::shared_ptr<AppExecFwk::OHOS
|
||||
}
|
||||
currentExtension_.reset(extension);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
mainRunner == nullptr ? abilityRecord->SetEventRunner(runner_) : abilityRecord->SetEventRunner(mainRunner);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
HandleAttachInner(application, abilityRecord);
|
||||
}
|
||||
|
||||
@@ -285,8 +285,6 @@ void FAAbilityThread::Attach(const std::shared_ptr<AppExecFwk::OHOSApplication>
|
||||
}
|
||||
currentAbility_.reset(ability);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(mainRunner);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = currentAbility_;
|
||||
std::shared_ptr<AppExecFwk::ContextDeal> contextDeal =
|
||||
@@ -356,8 +354,6 @@ void FAAbilityThread::AttachExtension(const std::shared_ptr<AppExecFwk::OHOSAppl
|
||||
|
||||
currentExtension_.reset(extension);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(mainRunner);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
extensionImpl_ = std::make_shared<ExtensionImpl>();
|
||||
if (extensionImpl_ == nullptr) {
|
||||
@@ -405,8 +401,6 @@ void FAAbilityThread::AttachExtension(const std::shared_ptr<AppExecFwk::OHOSAppl
|
||||
|
||||
currentExtension_.reset(extension);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(runner_);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
extensionImpl_ = std::make_shared<ExtensionImpl>();
|
||||
if (extensionImpl_ == nullptr) {
|
||||
@@ -460,8 +454,6 @@ void FAAbilityThread::Attach(const std::shared_ptr<AppExecFwk::OHOSApplication>
|
||||
}
|
||||
currentAbility_.reset(ability);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(runner_);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = currentAbility_;
|
||||
std::shared_ptr<AppExecFwk::ContextDeal> contextDeal =
|
||||
|
||||
@@ -140,8 +140,6 @@ void UIAbilityThread::Attach(const std::shared_ptr<AppExecFwk::OHOSApplication>
|
||||
ability->SetAbilityRecordId(abilityRecord->GetAbilityRecordId());
|
||||
currentAbility_.reset(ability);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(mainRunner);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = currentAbility_;
|
||||
std::shared_ptr<AppExecFwk::ContextDeal> contextDeal =
|
||||
@@ -212,8 +210,6 @@ void UIAbilityThread::Attach(const std::shared_ptr<AppExecFwk::OHOSApplication>
|
||||
ability->SetAbilityRecordId(abilityRecord->GetAbilityRecordId());
|
||||
currentAbility_.reset(ability);
|
||||
token_ = abilityRecord->GetToken();
|
||||
abilityRecord->SetEventHandler(abilityHandler_);
|
||||
abilityRecord->SetEventRunner(runner_);
|
||||
abilityRecord->SetAbilityThread(this);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = currentAbility_;
|
||||
std::shared_ptr<AppExecFwk::ContextDeal> contextDeal =
|
||||
|
||||
@@ -159,6 +159,7 @@ ohos_shared_library("appkit_native") {
|
||||
"${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:app_context_utils",
|
||||
|
||||
@@ -41,32 +41,6 @@ void AbilityRecordMgr::SetToken(const sptr<IRemoteObject> &token)
|
||||
tokens_ = token;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the eventRunner of abilitythread to the AbilityRecordMgr.
|
||||
*
|
||||
* @param eventRunner The runner of the abilitythread.
|
||||
*
|
||||
*/
|
||||
void AbilityRecordMgr::SetEventRunner(const std::shared_ptr<EventRunner> &eventRunner)
|
||||
{
|
||||
if (eventRunner == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "eventRunner is nullptr");
|
||||
return;
|
||||
}
|
||||
sptr<IRemoteObject> token = GetToken();
|
||||
if (token == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "token is nullptr");
|
||||
return;
|
||||
}
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> abilityInstance = GetAbilityItem(token);
|
||||
if (abilityInstance != nullptr) {
|
||||
abilityInstance->SetEventRunner(eventRunner);
|
||||
} else {
|
||||
TAG_LOGW(AAFwkTag::APPKIT, "ability record not exist");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Save the token and abilityRecord to the AbilityRecordMgr.
|
||||
*
|
||||
|
||||
@@ -706,9 +706,7 @@ void MainThread::ScheduleLaunchAbility(const AbilityInfo &info, const sptr<IRemo
|
||||
newWant.CloseAllFd();
|
||||
}
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>(info);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
abilityRecord->SetWant(want);
|
||||
abilityRecord->SetAbilityRecordId(abilityRecordId);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, want, abilityRecordId);
|
||||
auto tmpWatchdog = watchdog_;
|
||||
if (tmpWatchdog != nullptr) {
|
||||
tmpWatchdog->SetBgWorkingThreadStatus(IsBgWorkingThread(info));
|
||||
|
||||
@@ -19,16 +19,13 @@
|
||||
#include <string>
|
||||
|
||||
#include "iremote_object.h"
|
||||
#include "event_runner.h"
|
||||
#include "ability_info.h"
|
||||
#include "application_info.h"
|
||||
#include "refbase.h"
|
||||
#include "want.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace AppExecFwk {
|
||||
class AbilityThread;
|
||||
class AbilityImpl;
|
||||
class AbilityLocalRecord {
|
||||
public:
|
||||
/**
|
||||
@@ -36,7 +33,8 @@ public:
|
||||
* default constructor
|
||||
*
|
||||
*/
|
||||
AbilityLocalRecord(const std::shared_ptr<AbilityInfo> &info, const sptr<IRemoteObject> &token);
|
||||
AbilityLocalRecord(const std::shared_ptr<AbilityInfo> &info, const sptr<IRemoteObject> &token,
|
||||
const std::shared_ptr<AAFwk::Want> &want, int32_t abilityRecordId);
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -52,48 +50,13 @@ public:
|
||||
*/
|
||||
const std::shared_ptr<AbilityInfo> &GetAbilityInfo();
|
||||
|
||||
/**
|
||||
* @description: Get an EventHandler in an ability.
|
||||
*
|
||||
* @return Returns a pointer to EventHandler
|
||||
*/
|
||||
const std::shared_ptr<EventHandler> &GetEventHandler();
|
||||
|
||||
/**
|
||||
* @description: Set an EventHandler in an ability.
|
||||
* @param handler EventHandler object
|
||||
* @return None.
|
||||
*/
|
||||
void SetEventHandler(const std::shared_ptr<EventHandler> &handler);
|
||||
|
||||
/**
|
||||
* @description: Get an EventRunner in an ability.
|
||||
*
|
||||
* @return Returns a pointer to EventRunner
|
||||
*/
|
||||
const std::shared_ptr<EventRunner> &GetEventRunner();
|
||||
|
||||
/**
|
||||
* @description: Set an EventRunner in an ability.
|
||||
* @param runner EventHandler object
|
||||
* @return None.
|
||||
*/
|
||||
void SetEventRunner(const std::shared_ptr<EventRunner> &runner);
|
||||
|
||||
/**
|
||||
* @description: Gets the identity of the ability
|
||||
* @return return the identity of the ability.
|
||||
*/
|
||||
const sptr<IRemoteObject> &GetToken();
|
||||
|
||||
int32_t GetAbilityRecordId() const
|
||||
{
|
||||
return abilityRecordId_;
|
||||
}
|
||||
void SetAbilityRecordId(int32_t abilityRecordId)
|
||||
{
|
||||
abilityRecordId_ = abilityRecordId;
|
||||
}
|
||||
int32_t GetAbilityRecordId() const;
|
||||
|
||||
/**
|
||||
* @description: Obtains the information based on ability thread.
|
||||
@@ -113,14 +76,11 @@ public:
|
||||
const std::shared_ptr<AAFwk::Want> &GetWant();
|
||||
private:
|
||||
std::shared_ptr<AbilityInfo> abilityInfo_ = nullptr;
|
||||
sptr<IRemoteObject> token_;
|
||||
int32_t abilityRecordId_ = 0;
|
||||
std::shared_ptr<EventRunner> runner_ = nullptr;
|
||||
std::shared_ptr<EventHandler> handler_ = nullptr;
|
||||
std::shared_ptr<AbilityImpl> abilityImpl_ = nullptr; // store abilityImpl
|
||||
sptr<AbilityThread> abilityThread_;
|
||||
sptr<IRemoteObject> token_ = nullptr;
|
||||
std::shared_ptr<AAFwk::Want> want_ = nullptr;
|
||||
int32_t abilityRecordId_ = 0;
|
||||
sptr<AbilityThread> abilityThread_;
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_ABILITY_RUNTIME_ABILITY_LOCAL_RECORD_H
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
#endif // OHOS_ABILITY_RUNTIME_ABILITY_LOCAL_RECORD_H
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "ability_scheduler_stub.h"
|
||||
#include "context.h"
|
||||
#include "event_runner.h"
|
||||
#include "ohos_application.h"
|
||||
|
||||
namespace OHOS {
|
||||
|
||||
@@ -28,14 +28,6 @@ public:
|
||||
AbilityRecordMgr() = default;
|
||||
~AbilityRecordMgr() = default;
|
||||
|
||||
/**
|
||||
* @brief Set the eventRunner of abilitythread to the AbilityRecordMgr.
|
||||
*
|
||||
* @param eventRunner The runner of the abilitythread.
|
||||
*
|
||||
*/
|
||||
void SetEventRunner(const std::shared_ptr<EventRunner> &eventRunner);
|
||||
|
||||
/**
|
||||
* @brief Get the token witch is set to the AbilityRecordMgr.
|
||||
*
|
||||
|
||||
@@ -55,7 +55,7 @@ sptr<AppExecFwk::AbilityThread> MockCreateAbilityThread()
|
||||
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(info->name);
|
||||
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -89,7 +89,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_ConnectAbility_0100, Function
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -115,7 +115,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_DisconnectAbility_0100, Funct
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -142,7 +142,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_StartAbility_0100, Function |
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
Want want;
|
||||
@@ -163,7 +163,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_TerminateAbility_0100, Functi
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
Want want;
|
||||
@@ -190,7 +190,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_TerminateAbility_0200, Functi
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -214,7 +214,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_StopService_0100, Function |
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -243,7 +243,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_StopService_0200, Function |
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
@@ -331,7 +331,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_ConnectAbility_0300, Function
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
deal->SetAbilityInfo(abilityInfo);
|
||||
@@ -353,7 +353,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_StopService_0300, Function |
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
@@ -555,7 +555,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_GetAbilityInfoType_0200, Func
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
@@ -602,7 +602,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_GetResourceManager_0200, Func
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
deal->SetAbilityInfo(abilityInfo);
|
||||
@@ -651,7 +651,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_VerifyPermission_0300, Functi
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
deal->SetAbilityInfo(abilityInfo);
|
||||
@@ -896,7 +896,7 @@ HWTEST_F(AbilityContextTest, AaFwk_Ability_Context_SetColorMode_0100, Function |
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
std::shared_ptr<ContextDeal> deal = std::make_shared<ContextDeal>();
|
||||
deal->SetAbilityInfo(abilityInfo);
|
||||
|
||||
@@ -93,8 +93,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Start_Test_0100, Function | M
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
usleep(AbilityBaseTest::TEST_WAIT_TIME);
|
||||
@@ -117,8 +116,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Start_Test_0200, Function | M
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
usleep(AbilityBaseTest::TEST_WAIT_TIME);
|
||||
@@ -154,8 +152,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Start_Test_0400, Function | M
|
||||
if (abilityToken != nullptr) {
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
usleep(AbilityBaseTest::TEST_WAIT_TIME);
|
||||
@@ -177,8 +174,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Start_Test_0500, Function | M
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
usleep(AbilityBaseTest::TEST_WAIT_TIME);
|
||||
@@ -218,8 +214,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Start_Test_0600, Function | M
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -252,8 +247,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_Lifecycle_Test_0100, Function | MediumTe
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -283,8 +277,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Lifecycle_Test_0200, Function
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -315,8 +308,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Lifecycle_Test_0300, Function
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -350,8 +342,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Lifecycle_Test_0400, Function
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -384,8 +375,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Lifecycle_Test_0500, Function
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -420,8 +410,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_AbilityFwk_Lifecycle_Test_0600, Function
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -457,8 +446,7 @@ HWTEST_F(AbilityBaseTest, AaFwk_Ability_TerminateAbility_ForResult_Test_0100, Fu
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -527,8 +515,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0100, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_001 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -564,8 +551,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0200, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_002 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -601,8 +587,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0300, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_0300 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -638,8 +623,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0400, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_0400 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -675,8 +659,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0500, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_005 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -707,8 +690,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0600, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_006 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -739,8 +721,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0700, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_007 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -771,8 +752,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_Ability_Terminate_test_0800, Function | Med
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_Ability_Terminate_test_008 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -803,8 +783,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_WMS_window_test_0100, Function | MediumTest
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_WMS_window_test_001 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -836,8 +815,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_WMS_window_test_0200, Function | MediumTest
|
||||
abilityInfo->type = AppExecFwk::AbilityType::PAGE;
|
||||
abilityInfo->name = ABILITY_NAME;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
GTEST_LOG_(INFO) << "AaFwk_WMS_window_test_002 AbilityThreadMain";
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -873,8 +851,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_DataAbility_Launch_0100, Function | MediumT
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -906,8 +883,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_DataAbility_Start_0100, Function | MediumTe
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -939,8 +915,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_DataAbility_Start_0200, Function | MediumTe
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -972,8 +947,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_DataAbility_Start_0300, Function | MediumTe
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
@@ -1005,8 +979,7 @@ HWTEST_F(AbilityTerminateTest, AaFwk_DataAbility_Start_0400, Function | MediumTe
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->type = AppExecFwk::AbilityType::DATA;
|
||||
abilityInfo->name = "DemoAbility";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
|
||||
AbilityThread::AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
|
||||
|
||||
@@ -96,8 +96,7 @@ HWTEST_F(AbilityExtensionBaseTest, CreateAndInitContext_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "ExtensionBaseTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -127,8 +126,7 @@ HWTEST_F(AbilityExtensionBaseTest, GetContext_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "ExtensionBaseTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -157,8 +155,7 @@ HWTEST_F(AbilityExtensionBaseTest, OnConfigurationUpdated_0100, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "OnConfigurationUpdated start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -190,8 +187,7 @@ HWTEST_F(AbilityExtensionBaseTest, OnMemoryLevel_0100, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "OnMemoryLevel start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -222,8 +218,7 @@ HWTEST_F(AbilityExtensionBaseTest, SetExtensionCommon_0100, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "SetExtensionCommon start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
|
||||
@@ -65,8 +65,7 @@ HWTEST_F(AbilityExtensionContextTest, GetAbilityInfo_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "ExtensionContextTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -98,8 +97,7 @@ HWTEST_F(AbilityExtensionContextTest, SetAbilityInfo_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "ExtensionContextTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -137,8 +135,7 @@ HWTEST_F(AbilityExtensionContextTest, SetAbilityInfo_0200, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "ExtensionContextTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
|
||||
@@ -182,8 +182,7 @@ HWTEST_F(AbilityExtensionTest, Init_0200, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "Init start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
@@ -206,8 +205,7 @@ HWTEST_F(AbilityExtensionTest, Init_0300, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "Init start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
@@ -230,8 +228,7 @@ HWTEST_F(AbilityExtensionTest, Init_0400, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "Init start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
@@ -254,8 +251,7 @@ HWTEST_F(AbilityExtensionTest, Init_0500, TestSize.Level1)
|
||||
TAG_LOGI(AAFwkTag::TEST, "Init start");
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -280,8 +276,7 @@ HWTEST_F(AbilityExtensionTest, OnStart_0100, TestSize.Level1)
|
||||
Extension extension;
|
||||
// Init extension
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -319,8 +314,7 @@ HWTEST_F(AbilityExtensionTest, OnStop_0100, TestSize.Level1)
|
||||
Extension extension;
|
||||
// Init extension
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -346,8 +340,7 @@ HWTEST_F(AbilityExtensionTest, OnConnect_0100, TestSize.Level1)
|
||||
Extension extension;
|
||||
// Init extension
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -385,8 +378,7 @@ HWTEST_F(AbilityExtensionTest, OnDisconnect_0100, TestSize.Level1)
|
||||
Extension extension;
|
||||
// Init extension
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -424,8 +416,7 @@ HWTEST_F(AbilityExtensionTest, OnDisconnect_0200, TestSize.Level1)
|
||||
Extension extension;
|
||||
// Init extension
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
|
||||
@@ -97,29 +97,6 @@ HWTEST_F(AbilityRecordMgrTest, SetToken_0100, TestSize.Level0)
|
||||
GTEST_LOG_(INFO) << "AbilityRecordMgrTest SetToken_0100 end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number: SetEventRunner_0100
|
||||
* @tc.name: SetEventRunner
|
||||
* @tc.desc: SetEventRunner Test, return is not nullptr.
|
||||
*/
|
||||
HWTEST_F(AbilityRecordMgrTest, SetEventRunner_0100, TestSize.Level0)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AbilityRecordMgrTest SetEventRunner_0100 start";
|
||||
auto recordMgr = std::make_shared<OHOS::AppExecFwk::AbilityRecordMgr>();
|
||||
EXPECT_NE(recordMgr, nullptr);
|
||||
recordMgr->SetEventRunner(nullptr);
|
||||
|
||||
std::shared_ptr<AppExecFwk::EventRunner> runner = EventRunner::GetMainEventRunner();
|
||||
EXPECT_NE(runner, nullptr);
|
||||
recordMgr->tokens_ = nullptr;
|
||||
recordMgr->SetEventRunner(runner);
|
||||
|
||||
sptr<IRemoteObject> token = new (std::nothrow) AbilityMgrToken();
|
||||
recordMgr->SetToken(token);
|
||||
recordMgr->SetEventRunner(runner);
|
||||
GTEST_LOG_(INFO) << "AbilityRecordMgrTest SetEventRunner_0100 end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number: AddAbilityRecord_0100
|
||||
* @tc.name: AddAbilityRecord
|
||||
@@ -136,7 +113,7 @@ HWTEST_F(AbilityRecordMgrTest, AddAbilityRecord_0100, TestSize.Level0)
|
||||
token = new (std::nothrow) AbilityMgrToken();
|
||||
recordMgr->AddAbilityRecord(token, nullptr);
|
||||
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
EXPECT_NE(abilityRecord, nullptr);
|
||||
|
||||
recordMgr->AddAbilityRecord(token, abilityRecord);
|
||||
@@ -158,7 +135,7 @@ HWTEST_F(AbilityRecordMgrTest, RemoveAbilityRecord_0100, TestSize.Level0)
|
||||
recordMgr->RemoveAbilityRecord(token);
|
||||
|
||||
token = new (std::nothrow) AbilityMgrToken();
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
recordMgr->AddAbilityRecord(token, abilityRecord);
|
||||
EXPECT_EQ(recordMgr->abilityRecords_.size(), 1);
|
||||
|
||||
@@ -179,7 +156,7 @@ HWTEST_F(AbilityRecordMgrTest, GetRecordCount_0100, TestSize.Level0)
|
||||
EXPECT_EQ(recordMgr->GetRecordCount(), 0);
|
||||
|
||||
sptr<IRemoteObject> token = new (std::nothrow) AbilityMgrToken();
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
recordMgr->AddAbilityRecord(token, abilityRecord);
|
||||
EXPECT_EQ(recordMgr->GetRecordCount(), 1);
|
||||
GTEST_LOG_(INFO) << "AbilityRecordMgrTest GetRecordCount_0100 end";
|
||||
@@ -198,7 +175,7 @@ HWTEST_F(AbilityRecordMgrTest, GetAbilityItem_0100, TestSize.Level0)
|
||||
EXPECT_EQ(recordMgr->GetAbilityItem(token), nullptr);
|
||||
|
||||
token = new (std::nothrow) AbilityMgrToken();
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
recordMgr->AddAbilityRecord(token, abilityRecord);
|
||||
EXPECT_NE(recordMgr->GetAbilityItem(token), nullptr);
|
||||
|
||||
@@ -219,7 +196,7 @@ HWTEST_F(AbilityRecordMgrTest, GetAllTokens_0100, TestSize.Level0)
|
||||
auto recordMgr = std::make_shared<OHOS::AppExecFwk::AbilityRecordMgr>();
|
||||
|
||||
sptr<IRemoteObject> token = new (std::nothrow) AbilityMgrToken();
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
recordMgr->AddAbilityRecord(token, abilityRecord);
|
||||
EXPECT_EQ(recordMgr->GetAllTokens().size(), 1);
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ ohos_unittest("ability_service_extension_test") {
|
||||
deps = [
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:service_extension",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
|
||||
@@ -82,7 +82,7 @@ HWTEST_F(AbilityServiceExtensionTest, CreateAndInitContext_0100, TestSize.Level1
|
||||
applicationContext->AttachContextImpl(contextImpl);
|
||||
application->SetApplicationContext(applicationContext);
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
|
||||
ServiceExtension* serviceExtension = ServiceExtension::Create(nullptr);
|
||||
@@ -115,7 +115,7 @@ HWTEST_F(AbilityServiceExtensionTest, Init_0100, TestSize.Level1)
|
||||
applicationContext->AttachContextImpl(contextImpl);
|
||||
application->SetApplicationContext(applicationContext);
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
|
||||
ServiceExtension* serviceExtension = ServiceExtension::Create(nullptr);
|
||||
|
||||
@@ -666,7 +666,7 @@ HWTEST_F(MainThreadTest, CheckAbilityItem_0100, TestSize.Level1)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s start.", __func__);
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
EXPECT_FALSE(mainThread_->CheckAbilityItem(record));
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s end.", __func__);
|
||||
}
|
||||
@@ -680,7 +680,7 @@ HWTEST_F(MainThreadTest, CheckAbilityItem_0100, TestSize.Level1)
|
||||
HWTEST_F(MainThreadTest, CheckAbilityItem_0200, TestSize.Level1)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s start.", __func__);
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
EXPECT_FALSE(mainThread_->CheckAbilityItem(record));
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s end.", __func__);
|
||||
}
|
||||
@@ -991,7 +991,7 @@ HWTEST_F(MainThreadTest, PrepareAbilityDelegator_0400, TestSize.Level1)
|
||||
HWTEST_F(MainThreadTest, HandleLaunchAbility_0100, TestSize.Level1)
|
||||
{
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s start.", __func__);
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
ASSERT_NE(abilityRecord, nullptr);
|
||||
mainThread_->HandleLaunchAbility(abilityRecord);
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s end.", __func__);
|
||||
@@ -1903,11 +1903,11 @@ HWTEST_F(MainThreadTest, HandleLaunchAbility_0200, TestSize.Level1)
|
||||
|
||||
const std::shared_ptr<AbilityInfo> info1 = nullptr;
|
||||
const sptr<IRemoteObject> token = nullptr;
|
||||
const std::shared_ptr<AbilityLocalRecord> abilityRecord2 = std::make_shared<AbilityLocalRecord>(info1, token);
|
||||
const auto abilityRecord2 = std::make_shared<AbilityLocalRecord>(info1, token, nullptr, 0);
|
||||
mainThread_->HandleLaunchAbility(abilityRecord2);
|
||||
|
||||
const std::shared_ptr<AbilityInfo> info2 = std::make_shared<AbilityInfo>();
|
||||
const std::shared_ptr<AbilityLocalRecord> abilityRecord3 = std::make_shared<AbilityLocalRecord>(info2, token);
|
||||
const auto abilityRecord3 = std::make_shared<AbilityLocalRecord>(info2, token, nullptr, 0);
|
||||
mainThread_->application_ = std::make_shared<OHOSApplication>();
|
||||
mainThread_->HandleLaunchAbility(abilityRecord3);
|
||||
|
||||
@@ -1954,7 +1954,7 @@ HWTEST_F(MainThreadTest, HandleCleanAbility_0100, TestSize.Level1)
|
||||
mainThread_->HandleCleanAbility(token);
|
||||
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
mainThread_->abilityRecordMgr_->AddAbilityRecord(token, abilityRecord);
|
||||
mainThread_->HandleCleanAbility(token);
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_DumpApplication_010
|
||||
ohosApplication_->abilityRecordMgr_ = std::make_shared<AbilityRecordMgr>();
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
ohosApplication_->abilityRecordMgr_->abilityRecords_.emplace(token, record);
|
||||
ohosApplication_->DumpApplication();
|
||||
EXPECT_TRUE(record != nullptr);
|
||||
@@ -147,7 +147,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_DumpApplication_020
|
||||
ohosApplication_->abilityRecordMgr_ = std::make_shared<AbilityRecordMgr>();
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
info->permissions.push_back(std::string("abc"));
|
||||
ohosApplication_->abilityRecordMgr_->abilityRecords_.emplace(token, record);
|
||||
ohosApplication_->DumpApplication();
|
||||
@@ -291,7 +291,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_OnConfigurationUpda
|
||||
ohosApplication_->configuration_ = std::make_shared<Configuration>();
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
ohosApplication_->abilityRecordMgr_->abilityRecords_.emplace(token, abilityRecord);
|
||||
sptr<AbilityThread> abilityThread = new (std::nothrow) AbilityRuntime::FAAbilityThread();
|
||||
abilityRecord->SetAbilityThread(abilityThread);
|
||||
@@ -371,7 +371,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_OnMemoryLevel_0100,
|
||||
ohosApplication_->abilityRecordMgr_ = std::make_shared<AbilityRecordMgr>();
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
EXPECT_TRUE(abilityRecord != nullptr);
|
||||
ohosApplication_->abilityRecordMgr_->abilityRecords_.emplace(token, abilityRecord);
|
||||
sptr<AbilityThread> abilityThread = new (std::nothrow) AbilityRuntime::FAAbilityThread();
|
||||
@@ -450,7 +450,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_AddAbilityStage_030
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_OHOSApplicationTest_AddAbilityStage_0300 start.";
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
EXPECT_TRUE(ohosApplication_->abilityStages_.empty());
|
||||
auto callback = [](const std::shared_ptr<AbilityRuntime::Context> &) {};
|
||||
bool isAsyncCallback = false;
|
||||
@@ -469,7 +469,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_AddAbilityStage_040
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
info->applicationInfo.multiProjects = true;
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto want = std::make_shared<AAFwk::Want>();
|
||||
abilityRecord->SetWant(want);
|
||||
auto callback = [](const std::shared_ptr<AbilityRuntime::Context> &) {};
|
||||
@@ -490,7 +490,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_AddAbilityStage_050
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = nullptr;
|
||||
std::string moduleName = "entry";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
EXPECT_TRUE(ohosApplication_->abilityStages_.empty());
|
||||
std::shared_ptr<AbilityRuntime::AbilityStage> abilityStages = std::make_shared<AbilityRuntime::AbilityStage>();
|
||||
ohosApplication_->abilityStages_.emplace(moduleName, abilityStages);
|
||||
@@ -513,7 +513,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_AddAbilityStage_060
|
||||
sptr<Notification::MockIRemoteObject> token;
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
info->moduleName = "entry";
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto callback = [](const std::shared_ptr<AbilityRuntime::Context> &) {};
|
||||
bool isAsyncCallback = false;
|
||||
ohosApplication_->AddAbilityStage(abilityRecord, callback, isAsyncCallback);
|
||||
@@ -532,7 +532,7 @@ HWTEST_F(OHOSApplicationTest, AppExecFwk_OHOSApplicationTest_AddAbilityStage_070
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_OHOSApplicationTest_AddAbilityStage_0700 start.";
|
||||
sptr<Notification::MockIRemoteObject> token = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
abilityRecord->token_ = new (std::nothrow) Notification::MockIRemoteObject();
|
||||
auto callback = [](const std::shared_ptr<AbilityRuntime::Context> &) {};
|
||||
bool isAsyncCallback = false;
|
||||
|
||||
@@ -52,6 +52,7 @@ ohos_unittest("cj_ability_stage_object_test") {
|
||||
"${ability_runtime_innerkits_path}/runtime:runtime",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
|
||||
@@ -55,6 +55,7 @@ ohos_unittest("cj_ability_stage_test") {
|
||||
"${ability_runtime_innerkits_path}/runtime:runtime",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
|
||||
@@ -57,6 +57,7 @@ ohos_unittest("cj_ui_ability_test") {
|
||||
"${ability_runtime_native_path}/ability:ability_context_native",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:insight_intent_executor",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
|
||||
@@ -139,11 +139,11 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_Init_0100, Function | MediumTest | Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
cjAbility_->Init(nullptr, application, handler, token);
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
|
||||
abilityInfo->isModuleJson = true;
|
||||
abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -186,7 +186,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnNewWant_0100, Function | MediumTest | Leve
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
Want want;
|
||||
@@ -205,7 +205,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnStart_0100, Function | MediumTest | Level1
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
Want want;
|
||||
@@ -246,7 +246,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnStop_0100, Function | MediumTest | Level1)
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
cjAbility_->OnStop();
|
||||
AbilityLifecycleExecutor::LifecycleState state = cjAbility_->GetState();
|
||||
@@ -273,7 +273,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnBackground_0300, Function | MediumTest | L
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
cjAbility_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = cjAbility_->GetState();
|
||||
@@ -342,7 +342,7 @@ HWTEST_F(CjUIAbilityTest, CJUIAbility_OnStop_AsyncCallback_0100, TestSize.Level1
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
bool isAsyncCallback = false;
|
||||
cjAbility_->OnStop(nullptr, isAsyncCallback);
|
||||
@@ -407,7 +407,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnForeground_0100, Function | MediumTest | L
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
Want want;
|
||||
cjAbility_->OnForeground(want);
|
||||
@@ -452,7 +452,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnForeground_0300, Function | MediumTest | L
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
Want want;
|
||||
cjAbility_->OnForeground(want);
|
||||
@@ -479,8 +479,7 @@ HWTEST_F(CjUIAbilityTest, CJUIAbilityVirtualFunc_0100, TestSize.Level1)
|
||||
pageAbilityInfo->isStageBasedModel = true;
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, nullptr);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, nullptr, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, nullptr, handler, nullptr);
|
||||
cjAbility_->UpdateContextConfiguration();
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
@@ -531,8 +530,7 @@ HWTEST_F(CjUIAbilityTest, CJUIAbilityRequestFocus_0100, TestSize.Level1)
|
||||
pageAbilityInfo->isStageBasedModel = true;
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, nullptr);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, nullptr, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, nullptr, handler, nullptr);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -559,7 +557,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnBackground_0100, Function | MediumTest | L
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
cjAbility_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = cjAbility_->GetState();
|
||||
@@ -583,7 +581,7 @@ HWTEST_F(CjUIAbilityTest, CJRuntime_OnBackground_0200, Function | MediumTest | L
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
cjAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
cjAbility_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = cjAbility_->GetState();
|
||||
@@ -627,7 +625,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0100, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -650,7 +648,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0200, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
|
||||
Want want;
|
||||
@@ -679,7 +677,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0300, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -706,7 +704,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0400, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -744,7 +742,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0500, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -784,7 +782,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0600, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
EXPECT_NE(abilityLocalRecord, nullptr);
|
||||
|
||||
@@ -819,7 +817,7 @@ HWTEST_F(CjUIAbilityTest, InitedCJUIAbilityTest_0700, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
abilityInfo->isModuleJson = false;
|
||||
PreSetCJAbilityStageFuncs();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityLocalRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
initedCJUIAbility_->Init(abilityLocalRecord, application, handler, token);
|
||||
|
||||
Want want;
|
||||
|
||||
@@ -99,6 +99,7 @@ ohos_unittest("ability_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -618,6 +619,7 @@ ohos_unittest("ability_impl_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -675,6 +677,7 @@ ohos_unittest("ui_ability_impl_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -748,6 +751,7 @@ ohos_unittest("ability_thread_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -826,6 +830,7 @@ ohos_unittest("fa_ability_thread_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -936,6 +941,7 @@ ohos_unittest("ui_ability_thread_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -1319,6 +1325,7 @@ ohos_unittest("data_ability_impl_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -1390,6 +1397,7 @@ ohos_unittest("data_ability_impl_file_secondpart_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -1450,6 +1458,7 @@ ohos_unittest("data_ability_impl_file_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -1512,6 +1521,7 @@ ohos_unittest("ability_thread_dataability_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -1746,6 +1756,7 @@ ohos_unittest("ui_ability_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -1860,6 +1871,7 @@ ohos_unittest("form_host_client_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -1911,6 +1923,7 @@ ohos_unittest("continuation_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -2136,6 +2149,7 @@ ohos_unittest("ability_window_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -2199,6 +2213,7 @@ ohos_unittest("ability_handler_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:app_context_utils",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -2251,6 +2266,7 @@ ohos_unittest("ability_impl_factory_test") {
|
||||
"${ability_runtime_native_path}/ability/native:ability_business_error",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:continuation_ipc",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:app_context_utils",
|
||||
|
||||
@@ -125,7 +125,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_Active_001, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
@@ -165,7 +165,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_Active_002, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
@@ -205,7 +205,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_Active_003, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
@@ -244,7 +244,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_InActive_001, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
@@ -284,7 +284,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_InActive_002, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
@@ -324,7 +324,7 @@ HWTEST_F(AbilityImplActiveTest, AaFwk_AbilityImpl_InActive_003, TestSize.Level1)
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockAbilityClass> mockAbility = std::make_shared<MockAbilityClass>();
|
||||
std::shared_ptr<Ability> ability = std::static_pointer_cast<Ability>(mockAbility);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
|
||||
@@ -87,7 +87,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_ScheduleUpdateConfiguration_001, Tes
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
@@ -135,7 +135,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_ScheduleUpdateConfiguration_002, Tes
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
@@ -192,7 +192,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_ScheduleUpdateConfiguration_003, Tes
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
@@ -254,7 +254,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<Ability>();
|
||||
@@ -285,7 +285,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Start_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -324,7 +324,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Stop_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -362,7 +362,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Active_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -403,7 +403,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Inactive_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -444,7 +444,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Foreground_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -480,7 +480,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Background_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -523,7 +523,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -567,7 +567,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_002, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -611,7 +611,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Background_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -654,7 +654,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Background_002, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -699,7 +699,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_Background_001, TestS
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -744,7 +744,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_Background_002, TestS
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -790,7 +790,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_Background_003, TestS
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -835,7 +835,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_New_Foreground_Background_004, TestS
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -879,7 +879,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_DispatchSaveAbilityState_001, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<Ability>();
|
||||
@@ -907,7 +907,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_DispatchSaveAbilityState_002, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -935,7 +935,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_DispatchRestoreAbilityState_001, Tes
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<Ability>();
|
||||
@@ -966,7 +966,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_DispatchRestoreAbilityState_002, Tes
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -996,7 +996,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_ConnectAbility_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1034,7 +1034,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_CommandAbility_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1142,7 +1142,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_SendResult_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1182,7 +1182,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_NewWant_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1220,7 +1220,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_GetFileTypes_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1260,7 +1260,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_OpenFile_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1298,7 +1298,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Insert_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1337,7 +1337,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Update_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1377,7 +1377,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Delete_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1416,7 +1416,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Query_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1457,7 +1457,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_CheckAndSave_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1493,7 +1493,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_CheckAndRestore_001, TestSize.Level1
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1522,7 +1522,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_0200, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application;
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
std::shared_ptr<Ability> ability = pMocKPageAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -1563,7 +1563,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_0400, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<Ability> ability;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -1583,7 +1583,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_0500, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
std::shared_ptr<Ability> ability = pMocKPageAbility;
|
||||
std::shared_ptr<AbilityHandler> handler;
|
||||
@@ -1603,7 +1603,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_0600, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
std::shared_ptr<Ability> ability = pMocKPageAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -1624,7 +1624,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Init_0700, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockPageAbility> pMocKPageAbility = std::make_shared<MockPageAbility>();
|
||||
std::shared_ptr<Ability> ability = pMocKPageAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -1651,7 +1651,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Start_0200, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1689,7 +1689,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Start_0300, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
@@ -1888,7 +1888,7 @@ HWTEST_F(AbilityImplTest, AaFwk_AbilityImpl_Stop_0800, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability;
|
||||
|
||||
@@ -51,36 +51,6 @@ void AbilityLocalRecordTest::SetUp()
|
||||
void AbilityLocalRecordTest::TearDown()
|
||||
{}
|
||||
|
||||
/**
|
||||
* @tc.number: GetEventHandler_0100
|
||||
* @tc.name: GetEventHandler
|
||||
* @tc.desc: GetEventHandler Test, return is not nullptr.
|
||||
*/
|
||||
HWTEST_F(AbilityLocalRecordTest, GetEventHandler_0100, TestSize.Level0)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetEventHandler_0100 start";
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto handler = std::make_shared<EventHandler>(EventRunner::Create());
|
||||
record->SetEventHandler(handler);
|
||||
EXPECT_TRUE(record->GetEventHandler() != nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetEventHandler_0100 end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number: GetEventRunner_0100
|
||||
* @tc.name: GetEventRunner
|
||||
* @tc.desc: GetEventRunner Test, return is not nullptr.
|
||||
*/
|
||||
HWTEST_F(AbilityLocalRecordTest, GetEventRunner_0100, TestSize.Level0)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest SetEventHandler_0100 start";
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
std::shared_ptr<EventRunner> runner = EventRunner::GetMainEventRunner();
|
||||
record->SetEventRunner(runner);
|
||||
EXPECT_TRUE(record->GetEventRunner() != nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest SetEventHandler_0100 end";
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number: GetAbilityThread_0100
|
||||
* @tc.name: GetAbilityThread
|
||||
@@ -89,7 +59,7 @@ HWTEST_F(AbilityLocalRecordTest, GetEventRunner_0100, TestSize.Level0)
|
||||
HWTEST_F(AbilityLocalRecordTest, GetAbilityThread_0100, TestSize.Level0)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetAbilityThread_0100 start";
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0);
|
||||
auto abilityThread = sptr<AbilityThread>(nullptr);
|
||||
record->SetAbilityThread(abilityThread);
|
||||
EXPECT_TRUE(record->GetAbilityThread() == nullptr);
|
||||
@@ -104,9 +74,8 @@ HWTEST_F(AbilityLocalRecordTest, GetAbilityThread_0100, TestSize.Level0)
|
||||
HWTEST_F(AbilityLocalRecordTest, GetWant_0100, TestSize.Level0)
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetWant_0100 start";
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr);
|
||||
std::shared_ptr<AAFwk::Want> want;
|
||||
record->SetWant(want);
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, want, 0);
|
||||
EXPECT_TRUE(record->GetWant() == nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetWant_0100 end";
|
||||
}
|
||||
@@ -121,7 +90,7 @@ HWTEST_F(AbilityLocalRecordTest, GetAbilityInfo_0100, TestSize.Level0)
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetAbilityInfo_0100 start";
|
||||
auto info = std::make_shared<OHOS::AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new (std::nothrow) MockAbilityToken();
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
EXPECT_TRUE(record->GetAbilityInfo() != nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetAbilityInfo_0100 end";
|
||||
}
|
||||
@@ -136,7 +105,7 @@ HWTEST_F(AbilityLocalRecordTest, GetToken_0100, TestSize.Level0)
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetToken_0100 start";
|
||||
auto info = std::make_shared<OHOS::AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new (std::nothrow) MockAbilityToken();
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<OHOS::AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
EXPECT_TRUE(record->GetToken() != nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityLocalRecordTest GetToken_0100 end";
|
||||
}
|
||||
+5
-10
@@ -94,8 +94,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Query_0100, Function | MediumTes
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::shared_ptr<MockDataAbility> mockdataability = std::make_shared<MockDataAbility>();
|
||||
@@ -159,8 +158,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_GetFileTypes_0100, Function | Me
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::shared_ptr<MockDataAbility> mockdataability = std::make_shared<MockDataAbility>();
|
||||
@@ -223,8 +221,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_OpenFile_0100, Function | Medium
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::shared_ptr<MockDataAbility> mockdataability = std::make_shared<MockDataAbility>();
|
||||
@@ -283,8 +280,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Insert_0100, Function | MediumTe
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::shared_ptr<MockDataAbility> mockdataability = std::make_shared<MockDataAbility>();
|
||||
@@ -339,8 +335,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Update_0100, Function | MediumTe
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::shared_ptr<MockDataAbility> mockdataability = std::make_shared<MockDataAbility>();
|
||||
|
||||
@@ -88,7 +88,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_DumpAbilityInfo_0100, Function |
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -127,8 +127,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleSaveAbilityState_0100, F
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -176,8 +175,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleRestoreAbilityState_0100
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
PacMap state;
|
||||
@@ -225,8 +223,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Attach_3_Param_0100, Function |
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
sleep(1);
|
||||
@@ -253,8 +250,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Attach_3_Param_0200, Function |
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -282,8 +278,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Attach_2_Param_0100, Function |
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
|
||||
sleep(1);
|
||||
@@ -310,8 +305,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_Attach_2_Param_0200, Function |
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
@@ -341,8 +335,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleAbilityTransaction_0100,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -374,8 +367,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleAbilityTransaction_0200,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
|
||||
Want want;
|
||||
@@ -405,8 +397,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleConnectAbility_0100, Fun
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -436,8 +427,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleConnectAbility_0200, Fun
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -466,8 +456,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleDisconnectAbility_0100,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -497,8 +486,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleDisconnectAbility_0200,
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -528,8 +516,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleCommandAbility_0100, Fun
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -562,8 +549,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleCommandAbility_0200, Fun
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -594,8 +580,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_ScheduleCommandAbilityWindow_010
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -628,8 +613,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_SendResult_0100, Function | Medi
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityImpl> abilityimpl = std::make_shared<AbilityImpl>();
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
@@ -662,8 +646,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_SendResult_0200, Function | Medi
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -693,8 +676,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AbilityThreadMain_0100, Function
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
abilitythread->AbilityThreadMain(application, abilityRecord, mainRunner, nullptr);
|
||||
@@ -721,8 +703,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AbilityThreadMain_0200, Function
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
abilitythread->AbilityThreadMain(application, abilityRecord, mainRunner, nullptr);
|
||||
@@ -749,8 +730,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AbilityThreadMain_0300, Function
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
abilitythread->AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -777,8 +757,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AbilityThreadMain_0400, Function
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
abilitythread->AbilityThreadMain(application, abilityRecord, nullptr);
|
||||
@@ -804,7 +783,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AttachExtension_0100, Function |
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
@@ -833,7 +812,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AttachExtension_0200, Function |
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
@@ -858,7 +837,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_AttachExtension_0201, Function |
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, nullptr);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
@@ -1287,7 +1266,7 @@ HWTEST_F(AbilityThreadTest, AaFwk_AbilityThread_SendResult_0300, Function | Medi
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto application = std::make_shared<OHOSApplication>();
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ HWTEST_F(ActionExtensionTest, Action_Extension_0300, Function | MediumTest | Lev
|
||||
GTEST_LOG_(INFO) << "Action_Extension_0300 start";
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
auto contextImpl = std::make_shared<ContextImpl>();
|
||||
auto applicationContext = ApplicationContext::GetInstance();
|
||||
|
||||
@@ -98,7 +98,7 @@ HWTEST_F(AutoFillExtensionTest, Init_0100, Function | MediumTest | Level1)
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
EXPECT_NE(token, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
EXPECT_NE(record, nullptr);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
EXPECT_NE(application, nullptr);
|
||||
@@ -108,7 +108,7 @@ HWTEST_F(AutoFillExtensionTest, Init_0100, Function | MediumTest | Level1)
|
||||
application->SetApplicationContext(applicationContext);
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
EXPECT_NE(handler, nullptr);
|
||||
|
||||
|
||||
autoFillExtension->Init(record, application, handler, token);
|
||||
EXPECT_TRUE(autoFillExtension->context_ != nullptr);
|
||||
GTEST_LOG_(INFO) << "Init_0100 end";
|
||||
@@ -135,7 +135,7 @@ HWTEST_F(AutoFillExtensionTest, CreateAndInitContext_0100, Function | MediumTest
|
||||
abilityInfo->bundleName = BUNDLE_NAME;
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
EXPECT_NE(token, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
EXPECT_NE(record, nullptr);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
EXPECT_NE(application, nullptr);
|
||||
@@ -145,7 +145,7 @@ HWTEST_F(AutoFillExtensionTest, CreateAndInitContext_0100, Function | MediumTest
|
||||
application->SetApplicationContext(applicationContext);
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
EXPECT_NE(handler, nullptr);
|
||||
|
||||
|
||||
auto context = autoFillExtension->CreateAndInitContext(record, application, handler, token);
|
||||
EXPECT_NE(context, nullptr);
|
||||
|
||||
@@ -157,7 +157,7 @@ HWTEST_F(AutoFillExtensionTest, CreateAndInitContext_0100, Function | MediumTest
|
||||
auto resourceManager = appContext->GetResourceManager();
|
||||
EXPECT_EQ(context->GetResourceManager(), resourceManager);
|
||||
EXPECT_EQ(context->parentContext_, appContext);
|
||||
|
||||
|
||||
EXPECT_EQ(context->GetAbilityInfo(), abilityInfo);
|
||||
EXPECT_EQ(context->GetConfiguration(), appContext->GetConfiguration());
|
||||
|
||||
@@ -193,7 +193,7 @@ HWTEST_F(AutoFillExtensionTest, CreateAndInitContext_0200, Function | MediumTest
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
EXPECT_NE(handler, nullptr);
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record = nullptr;
|
||||
|
||||
|
||||
auto context = autoFillExtension->CreateAndInitContext(record, application, handler, token);
|
||||
EXPECT_NE(context, nullptr);
|
||||
|
||||
@@ -205,7 +205,7 @@ HWTEST_F(AutoFillExtensionTest, CreateAndInitContext_0200, Function | MediumTest
|
||||
auto resourceManager = appContext->GetResourceManager();
|
||||
EXPECT_EQ(context->GetResourceManager(), resourceManager);
|
||||
EXPECT_EQ(context->parentContext_, appContext);
|
||||
|
||||
|
||||
EXPECT_EQ(context->GetAbilityInfo(), nullptr);
|
||||
EXPECT_EQ(context->GetConfiguration(), nullptr);
|
||||
|
||||
|
||||
+3
-3
@@ -69,7 +69,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_BatchInsert_001, Functio
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
dataabilityimpl->Init(application, record, ability, handler, token);
|
||||
@@ -117,7 +117,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_HandleAbilityTransaction
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
dataabilityimpl->Init(application, record, ability, handler, token);
|
||||
@@ -144,7 +144,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_HandleAbilityTransaction
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
dataabilityimpl->Init(application, record, ability, handler, token);
|
||||
|
||||
@@ -69,7 +69,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetType_001, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -97,7 +97,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetType_002, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = nullptr;
|
||||
@@ -123,7 +123,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetFileTypes_001, Functi
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -178,7 +178,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenFile_001, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -229,7 +229,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenRawFile_001, Functio
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -280,7 +280,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Reload_001, Function | M
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
|
||||
@@ -77,7 +77,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Insert_0100, Function |
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
abilityInfo->isNativeAbility = true;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -129,7 +129,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Insert_0300, Function |
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -163,7 +163,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Update_0100, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -214,7 +214,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Update_0300, Function |
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -247,7 +247,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Delete_0100, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -297,7 +297,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Delete_0300, Function |
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -330,7 +330,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Query_0100, Function | M
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -383,7 +383,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Query_0300, Function | M
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -418,7 +418,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenFile_0100, Function
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -466,7 +466,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenFile_0300, Function
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -497,7 +497,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenRawFile_0100, Functi
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -545,7 +545,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_OpenRawFile_0300, Functi
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -576,7 +576,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Call_0100, Function | Me
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -627,7 +627,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetFileTypes_0100, Funct
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -677,7 +677,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetType_0100, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -722,7 +722,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_Reload_0100, Function |
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -767,7 +767,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_BatchInsert_0100, Functi
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -816,7 +816,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_BatchInsert_0300, Functi
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -848,7 +848,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_NormalizeUri_0100, Funct
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -895,7 +895,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_NormalizeUri_0300, Funct
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -926,7 +926,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_DenormalizeUri_0100, Fun
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -973,7 +973,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_DenormalizeUri_0300, Fun
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1006,7 +1006,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetPermissionInfo_0100,
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1039,7 +1039,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetPermissionInfo_0200,
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1072,7 +1072,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetPermissionInfo_0300,
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1105,7 +1105,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetPermissionInfo_0400,
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1135,7 +1135,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_GetPermissionInfo_0500,
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1166,7 +1166,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1202,7 +1202,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1235,7 +1235,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1268,7 +1268,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1304,7 +1304,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1339,7 +1339,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_CheckOpenFilePermission_
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1374,7 +1374,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_CheckOpenFilePermission_
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1409,7 +1409,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_CheckOpenFilePermission_
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1444,7 +1444,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_CheckOpenFilePermission_
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1479,7 +1479,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_CheckOpenFilePermission_
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1512,7 +1512,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_ExecuteBatch_0100, Funct
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1559,7 +1559,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_ExecuteBatch_0300, Funct
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1594,7 +1594,7 @@ HWTEST_F(DataAbilityImplTest, AaFwk_DataAbilityImplTest_ExecuteBatch_0400, Funct
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1625,7 +1625,7 @@ HWTEST_F(
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1653,7 +1653,7 @@ HWTEST_F(
|
||||
abilityInfo->name = "MockDataAbility";
|
||||
abilityInfo->type = AbilityType::DATA;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1685,7 +1685,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1721,7 +1721,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1757,7 +1757,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1793,7 +1793,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
@@ -1829,7 +1829,7 @@ HWTEST_F(
|
||||
abilityInfo->readPermission = "r";
|
||||
abilityInfo->writePermission = "w";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> ability = std::make_shared<MockDataAbility>();
|
||||
|
||||
@@ -84,7 +84,7 @@ HWTEST_F(EmbeddedUIExtensionTest, EmbeddedUI_Extension_0300, Function | MediumTe
|
||||
GTEST_LOG_(INFO) << "EmbeddedUI_Extension_0300 start";
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
auto contextImpl = std::make_shared<ContextImpl>();
|
||||
auto applicationContext = ApplicationContext::GetInstance();
|
||||
|
||||
+15
-25
@@ -68,7 +68,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_DumpAbilityInfo_0100
|
||||
abilityInfo->type = AbilityType::EXTENSION;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
std::vector<std::string> params;
|
||||
@@ -144,8 +144,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_Attach_3_Param_0100,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
sleep(1);
|
||||
@@ -173,8 +172,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_Attach_3_Param_0200,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
sleep(1);
|
||||
@@ -202,8 +200,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_Attach_2_Param_0100,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
extensionabilitythread->Attach(application, abilityRecord, nullptr);
|
||||
sleep(1);
|
||||
}
|
||||
@@ -230,8 +227,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_Attach_2_Param_0200,
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, nullptr);
|
||||
sleep(1);
|
||||
@@ -260,8 +256,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleAbilityTrans
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -293,8 +288,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleAbilityTrans
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
extensionabilitythread->Attach(application, abilityRecord, nullptr);
|
||||
Want want;
|
||||
LifeCycleStateInfo lifeCycleStateInfo;
|
||||
@@ -367,8 +361,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleConnectAbili
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -397,7 +390,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleConnectAbili
|
||||
abilityInfo->type = AbilityType::EXTENSION;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -426,8 +419,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleDisconnectAb
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -456,7 +448,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleDisconnectAb
|
||||
abilityInfo->type = AbilityType::EXTENSION;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -486,8 +478,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleCommandAbili
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -518,7 +509,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleCommandAbili
|
||||
abilityInfo->type = AbilityType::EXTENSION;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -549,8 +540,7 @@ HWTEST_F(ExtensionAbilityThreadTest, ExtensionAbilityThread_ScheduleCommandAbili
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
extensionabilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -1007,7 +997,7 @@ HWTEST_F(
|
||||
abilityInfo->name = "ExtensionAbility";
|
||||
abilityInfo->type = AbilityType::EXTENSION;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::string abilityName = extensionabilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
|
||||
@@ -111,7 +111,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_0300, Function | MediumTest | Le
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<AbilityRuntime::Extension> extension;
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler;
|
||||
@@ -199,7 +199,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_0700, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -222,7 +222,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_0800, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -279,7 +279,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_1100, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -304,7 +304,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_1200, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -360,7 +360,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_1500, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -386,7 +386,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_1600, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -439,7 +439,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_1900, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -496,7 +496,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2200, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -523,7 +523,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2300, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -560,7 +560,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2600, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -591,7 +591,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2700, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -618,7 +618,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2800, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -645,7 +645,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_2900, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -670,7 +670,7 @@ HWTEST_F(ExtensionImplTest, AaFwk_ExtensionImpl_3000, Function | MediumTest | Le
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto extension = std::make_shared<AbilityRuntime::Extension>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
|
||||
@@ -54,7 +54,7 @@ void ExtensionTest::SetUp(void)
|
||||
{
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
|
||||
@@ -54,7 +54,7 @@ void ExtensionTest::SetUp(void)
|
||||
{
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<EventRunner> runner;
|
||||
auto handler = std::make_shared<AppExecFwk::AbilityHandler>(runner);
|
||||
@@ -97,7 +97,7 @@ HWTEST_F(ExtensionTest, AaFwk_Extension_0200, Function | MediumTest | Level1)
|
||||
OHOS::AppExecFwk::AbilityInfo abilityInfo;
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application;
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler;
|
||||
|
||||
@@ -162,7 +162,7 @@ HWTEST_F(ExtensionTest, AaFwk_Extension_0500, Function | MediumTest | Level1)
|
||||
GTEST_LOG_(INFO) << "AaFwk_Extension_0500 start";
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_CreateAbilityName_0100, Functi
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, nullptr);
|
||||
EXPECT_EQ(abilityName, "");
|
||||
@@ -271,7 +271,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_CreateExtensionAbilityName_010
|
||||
std::string abilityName = "MockPageAbility";
|
||||
abilitythread->CreateExtensionAbilityName(application, abilityInfo, abilityName);
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::string ret = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
EXPECT_EQ(abilityName, "MockPageAbility");
|
||||
GTEST_LOG_(INFO) << "AaFwk_AbilityThread_CreateExtensionAbilityName_0101 end";
|
||||
@@ -295,7 +295,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_CreateExtensionAbilityName_020
|
||||
std::string abilityName = "";
|
||||
abilitythread->CreateExtensionAbilityName(application, abilityInfo, abilityName);
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::string ret = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
EXPECT_EQ(abilityName, "ServiceExtension");
|
||||
GTEST_LOG_(INFO) << "AaFwk_AbilityThread_CreateExtensionAbilityName_0200 end";
|
||||
@@ -316,7 +316,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_AttachExtension_0300, Function
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
|
||||
@@ -370,7 +370,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_AttachExtension_0500, Function
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
@@ -398,7 +398,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_CreateAndInitContextDeal_0500,
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
@@ -424,7 +424,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_CreateAndInitContextDeal_0600,
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = std::make_shared<AppExecFwk::AbilityContext>();
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, nullptr);
|
||||
@@ -453,7 +453,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_InitExtensionFlag_0200, Functi
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
@@ -485,7 +485,7 @@ HWTEST_F(FaAbilityThreadTest, AaFwk_AbilityThread_InitExtensionFlag_0300, Functi
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::string abilityName = abilitythread->CreateAbilityName(abilityRecord, application);
|
||||
auto extension = AbilityLoader::GetInstance().GetExtensionByName(abilityName);
|
||||
|
||||
@@ -94,7 +94,7 @@ HWTEST_F(FormExtensionTest, AaFwk_Form_Extension_0300, Function | MediumTest | L
|
||||
GTEST_LOG_(INFO) << "AaFwk_Form_Extension_0300 start";
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AbilityRuntime::ContextImpl> contextImpl = std::make_shared<AbilityRuntime::ContextImpl>();
|
||||
@@ -141,7 +141,7 @@ HWTEST_F(FormExtensionTest, AaFwk_Form_Extension_0500, Function | MediumTest | L
|
||||
GTEST_LOG_(INFO) << "AaFwk_Form_Extension_0500 start";
|
||||
std::shared_ptr<AbilityInfo> info = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(info, token, nullptr, 0);
|
||||
std::shared_ptr<OHOSApplication> application;
|
||||
std::shared_ptr<AbilityHandler> handler;
|
||||
AbilityRuntime::Runtime::Options options;
|
||||
|
||||
@@ -79,7 +79,7 @@ HWTEST_F(NewAbilityImplTest, AaFwk_NewAbilityImpl_HandleAbilityTransaction_0100,
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "newAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -136,7 +136,7 @@ HWTEST_F(NewAbilityImplTest, AaFwk_NewAbilityImpl_HandleAbilityTransaction_0300,
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "newAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
|
||||
@@ -73,7 +73,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoKeyDown_0100, Function | M
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -106,7 +106,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoKeyDown_0200, Function | M
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -138,7 +138,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoKeyUp_0100, Function | Med
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -171,7 +171,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoKeyUp_0200, Function | Med
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -204,7 +204,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoTouchEvent_0100, Function
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -237,7 +237,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DoTouchEvent_0200, Function
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -269,7 +269,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_010
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -303,7 +303,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_020
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -333,7 +333,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_030
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -363,7 +363,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_040
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -393,7 +393,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_050
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -425,7 +425,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_060
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -458,7 +458,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_070
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -493,7 +493,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_080
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -527,7 +527,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_090
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -563,7 +563,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DispatchSaveAbilityState_010
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -590,7 +590,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_DispatchRestoreAbilityState_
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -618,7 +618,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_SendResult_0100, Function |
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -648,7 +648,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_NewWant_0100, Function | Med
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -674,7 +674,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_100
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -705,7 +705,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_110
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -736,7 +736,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_120
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -767,7 +767,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_130
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -798,7 +798,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_140
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -829,7 +829,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_150
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -861,7 +861,7 @@ HWTEST_F(PageAbilityImplTest, AaFwk_PageAbilityImpl_HandleAbilityTransaction_160
|
||||
auto abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "pageAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
auto eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
|
||||
@@ -72,7 +72,7 @@ HWTEST_F(ServiceAbilityImplTest, AaFwk_ServiceAbilityImpl_HandleAbilityTransacti
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "MockServiceAbility";
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
sptr<AbilityThread> abilityThread =
|
||||
@@ -113,7 +113,7 @@ HWTEST_F(ServiceAbilityImplTest, AaFwk_ServiceAbilityImpl_HandleAbilityTransacti
|
||||
abilityInfo->name = "MockServiceAbility";
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
sptr<AbilityThread> abilityThread =
|
||||
@@ -150,7 +150,7 @@ HWTEST_F(ServiceAbilityImplTest, AaFwk_ServiceAbilityImpl_HandleAbilityTransacti
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
abilityInfo->name = "MockServiceAbility";
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -186,7 +186,7 @@ HWTEST_F(ServiceAbilityImplTest, AaFwk_ServiceAbilityImpl_HandleAbilityTransacti
|
||||
abilityInfo->name = "MockServiceAbility";
|
||||
abilityInfo->type = AppExecFwk::AbilityType::SERVICE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ HWTEST_F(ShareExtensionTest, Share_Extension_0300, Function | MediumTest | Level
|
||||
GTEST_LOG_(INFO) << "Share_Extension_0300 start";
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
auto contextImpl = std::make_shared<ContextImpl>();
|
||||
auto applicationContext = ApplicationContext::GetInstance();
|
||||
|
||||
@@ -84,7 +84,7 @@ HWTEST_F(ShareExtensionTest, Share_Extension_0300, Function | MediumTest | Level
|
||||
GTEST_LOG_(INFO) << "Share_Extension_0300 start";
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
auto contextImpl = std::make_shared<ContextImpl>();
|
||||
auto applicationContext = ApplicationContext::GetInstance();
|
||||
|
||||
@@ -80,7 +80,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_ScheduleUpdateConfiguration_001, Test
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
@@ -128,7 +128,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_ScheduleUpdateConfiguration_002, Test
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
@@ -184,7 +184,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_ScheduleUpdateConfiguration_003, Test
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
@@ -244,7 +244,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = std::make_shared<UIAbility>();
|
||||
@@ -274,7 +274,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Start_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -313,7 +313,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Stop_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -353,7 +353,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> uiability = nullptr;
|
||||
@@ -397,7 +397,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_002, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> uiability = nullptr;
|
||||
@@ -439,7 +439,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Background_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = nullptr;
|
||||
@@ -482,7 +482,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Background_002, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = nullptr;
|
||||
@@ -527,7 +527,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_Background_001, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = nullptr;
|
||||
@@ -572,7 +572,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_Background_002, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> uiability = nullptr;
|
||||
@@ -618,7 +618,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_Background_003, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<Ability> uiability = nullptr;
|
||||
@@ -663,7 +663,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_New_Foreground_Background_004, TestSi
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = nullptr;
|
||||
@@ -707,7 +707,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_DispatchRestoreAbilityState_001, Test
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = std::make_shared<UIAbility>();
|
||||
@@ -737,7 +737,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_DispatchRestoreAbilityState_002, Test
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability = nullptr;
|
||||
@@ -767,7 +767,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_SendResult_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -806,7 +806,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_NewWant_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -843,7 +843,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_CheckAndRestore_001, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -872,7 +872,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_0200, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application;
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
std::shared_ptr<UIAbility> uiability = pMocKUIAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -913,7 +913,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_0400, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
@@ -933,7 +933,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_0500, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
std::shared_ptr<UIAbility> uiability = pMocKUIAbility;
|
||||
std::shared_ptr<AbilityHandler> handler;
|
||||
@@ -953,7 +953,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_0600, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
std::shared_ptr<UIAbility> uiability = pMocKUIAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -974,7 +974,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Init_0700, TestSize.Level1)
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<MockUIAbility> pMocKUIAbility = std::make_shared<MockUIAbility>();
|
||||
std::shared_ptr<UIAbility> uiability = pMocKUIAbility;
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
@@ -1002,7 +1002,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Start_0300, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
@@ -1201,7 +1201,7 @@ HWTEST_F(UIAbilityImplTest, AbilityRuntime_Stop_0800, TestSize.Level1)
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
std::shared_ptr<UIAbility> uiability;
|
||||
|
||||
@@ -72,11 +72,11 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_Name_0100, Function | MediumTest | Le
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
EXPECT_STREQ(abilityInfo->name.c_str(), ability_->GetAbilityName().c_str());
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord2 = std::make_shared<AbilityLocalRecord>(nullptr, abilityToken);
|
||||
auto abilityRecord2 = std::make_shared<AbilityLocalRecord>(nullptr, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord2, application, handler, token);
|
||||
EXPECT_EQ("", ability_->GetAbilityName());
|
||||
|
||||
@@ -106,7 +106,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_GetAbilityName_0100, Function | Mediu
|
||||
std::string name = "LOL";
|
||||
abilityInfo->name = name;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
EXPECT_STREQ(ability_->GetAbilityName().c_str(), name.c_str());
|
||||
GTEST_LOG_(INFO) << "AbilityRuntime_GetAbilityName_0100 end";
|
||||
@@ -127,12 +127,11 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_GetModuleName_0100, Function | Medium
|
||||
std::string name = "LOL";
|
||||
abilityInfo->moduleName = name;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(nullptr, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(nullptr, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
EXPECT_EQ(ability_->GetModuleName(), "");
|
||||
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord2 = std::make_shared<AbilityLocalRecord>(abilityInfo,
|
||||
abilityToken);
|
||||
auto abilityRecord2 = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord2, application, handler, token);
|
||||
EXPECT_STREQ(ability_->GetModuleName().c_str(), name.c_str());
|
||||
}
|
||||
@@ -151,7 +150,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_GetLifecycle_0100, Function | MediumT
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
std::shared_ptr<LifeCycle> lifeCycle = ability_->GetLifecycle();
|
||||
EXPECT_NE(lifeCycle, nullptr);
|
||||
@@ -201,7 +200,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnNewWant_0100, Function | MediumTest
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability_->OnNewWant(want);
|
||||
@@ -222,7 +221,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnRestoreAbilityState_0100, Function
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
PacMap inState;
|
||||
ability_->OnRestoreAbilityState(inState);
|
||||
@@ -243,7 +242,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_GetWindow_001, Function | MediumTest
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
EXPECT_EQ(ability_->GetWindow(), nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityRuntime_GetWindow_0100 end";
|
||||
@@ -265,7 +264,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnStart_0100, Function | MediumTest |
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability_->OnStart(want);
|
||||
@@ -318,7 +317,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnStart_0300, TestSize.Level1)
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability->OnStart(want);
|
||||
@@ -364,7 +363,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnStop_0100, Function | MediumTest |
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
ability_->OnStop();
|
||||
AbilityLifecycleExecutor::LifecycleState state = ability_->GetState();
|
||||
@@ -442,7 +441,7 @@ HWTEST_F(UIAbilityBaseTest, DestroyInstance_0100, TestSize.Level1)
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, application, handler, token);
|
||||
ability->DestroyInstance();
|
||||
TAG_LOGI(AAFwkTag::TEST, "%{public}s end.", __func__);
|
||||
@@ -463,7 +462,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnForeground_0100, Function | MediumT
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
bool prevSilentForground = ability_->CheckIsSilentForeground();
|
||||
@@ -513,7 +512,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnForeground_0300, Function | MediumT
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability_->OnForeground(want);
|
||||
@@ -540,7 +539,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnBackground_0100, Function | MediumT
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
ability_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = ability_->GetState();
|
||||
@@ -564,7 +563,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnBackground_0200, Function | MediumT
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
ability_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = ability_->GetState();
|
||||
@@ -590,7 +589,7 @@ HWTEST_F(UIAbilityBaseTest, AaFwk_Ability_OnBackground_0300, Function | MediumTe
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
ability_->OnBackground();
|
||||
AbilityLifecycleExecutor::LifecycleState state = ability_->GetState();
|
||||
@@ -627,7 +626,7 @@ HWTEST_F(UIAbilityBaseTest, AbilityRuntime_OnBackground_0400, TestSize.Level1)
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, application, handler, token);
|
||||
int32_t displayId = 0;
|
||||
sptr<Rosen::WindowOption> option = new Rosen::WindowOption();
|
||||
@@ -771,8 +770,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilityContinuation_0300, TestSize.Level1)
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
Want want;
|
||||
bool success = false;
|
||||
@@ -1090,8 +1088,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilitySetMissionLabel_0100, TestSize.Level1)
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
ret = ability->SetMissionLabel(label);
|
||||
EXPECT_EQ(ret, -1);
|
||||
@@ -1124,8 +1121,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilitySetMissionIcon_0100, TestSize.Level1)
|
||||
std::shared_ptr<EventRunner> eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
ret = ability->SetMissionIcon(icon);
|
||||
EXPECT_EQ(ret, -1);
|
||||
@@ -1153,8 +1149,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilityOnChange_0100, TestSize.Level1)
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
|
||||
// application is nullptr
|
||||
@@ -1188,8 +1183,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilityOnDisplayMove_0100, TestSize.Level1)
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
|
||||
// application is nullptr
|
||||
@@ -1228,8 +1222,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbilityRequestFocus_0100, TestSize.Level1)
|
||||
auto eventRunner = EventRunner::Create(pageAbilityInfo->name);
|
||||
auto handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(pageAbilityInfo, abilityToken, nullptr, 0);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
|
||||
// window is nullptr
|
||||
@@ -1269,7 +1262,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_OnStop_AsyncCallback_0100, TestSize.Level1
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
bool isAsyncCallback = false;
|
||||
ability_->OnStop(nullptr, isAsyncCallback);
|
||||
@@ -1298,7 +1291,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_OnConfigurationUpdatedNotify_0100, TestSiz
|
||||
std::shared_ptr<AbilityHandler> handler = nullptr;
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
auto abilityContext = std::make_shared<AbilityRuntime::AbilityContextImpl>();
|
||||
ability_->AttachAbilityContext(abilityContext);
|
||||
@@ -1325,7 +1318,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_InitWindow_0100, TestSize.Level1)
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
int32_t displayId = 0;
|
||||
sptr<Rosen::WindowOption> option = new Rosen::WindowOption();
|
||||
@@ -1366,7 +1359,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_GetWindowOption_0100, TestSize.Level1)
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
CustomizeData custData = CustomizeData("ShowOnLockScreen", "0", "");
|
||||
std::vector<CustomizeData> vecCustData;
|
||||
@@ -1396,7 +1389,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_DoOnForeground_0100, TestSize.Level1)
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability_->DoOnForeground(want);
|
||||
@@ -1422,7 +1415,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_DoOnForeground_0200, TestSize.Level1)
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(eventRunner);
|
||||
sptr<IRemoteObject> token = nullptr;
|
||||
sptr<IRemoteObject> abilityToken = sptr<IRemoteObject>(new AbilityRuntime::FAAbilityThread());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, abilityToken, nullptr, 0);
|
||||
ability_->Init(abilityRecord, application, handler, token);
|
||||
Want want;
|
||||
ability_->DoOnForeground(want);
|
||||
@@ -1455,7 +1448,7 @@ HWTEST_F(UIAbilityBaseTest, UIAbility_RegisterAbilityLifecycleObserver_0100, Fun
|
||||
|
||||
// init UIAbility to make sure lifecycle is created.
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, nullptr);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AbilityHandler> handler = std::make_shared<AbilityHandler>(nullptr);
|
||||
ability->Init(abilityRecord, nullptr, handler, nullptr);
|
||||
std::shared_ptr<LifeCycle> lifeCycle = ability->GetLifecycle();
|
||||
|
||||
@@ -74,8 +74,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_DumpAbilityInfo_0100, Function | Me
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
|
||||
@@ -169,8 +168,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_ScheduleSaveAbilityState_0100, Func
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
abilitythread->ScheduleSaveAbilityState();
|
||||
@@ -214,8 +212,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_ScheduleRestoreAbilityState_0100, F
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
PacMap state;
|
||||
@@ -260,8 +257,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_Attach_3_Param_0100, Function | Med
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
sleep(1);
|
||||
@@ -288,8 +284,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_Attach_3_Param_0200, Function | Med
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
sleep(1);
|
||||
@@ -316,8 +311,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_Attach_2_Param_0100, Function | Med
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
sleep(1);
|
||||
}
|
||||
@@ -343,8 +337,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_Attach_2_Param_0200, Function | Med
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = nullptr;
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
sleep(1);
|
||||
@@ -371,8 +364,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_ScheduleAbilityTransaction_0100, Fu
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
Want want;
|
||||
@@ -402,8 +394,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_ScheduleAbilityTransaction_0200, Fu
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
abilitythread->Attach(application, abilityRecord, nullptr);
|
||||
Want want;
|
||||
LifeCycleStateInfo lifeCycleStateInfo;
|
||||
@@ -491,8 +482,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_SendResult_0100, Function | MediumT
|
||||
EXPECT_NE(token, nullptr);
|
||||
if (token != nullptr) {
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord =
|
||||
std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
std::shared_ptr<AbilityRuntime::UIAbilityImpl> abilityimpl =
|
||||
std::make_shared<AbilityRuntime::UIAbilityImpl>();
|
||||
@@ -523,7 +513,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_SendResult_0200, Function | MediumT
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
int requestCode = 0;
|
||||
@@ -549,7 +539,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_SendResult_0300, Function | MediumT
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
auto application = std::make_shared<OHOSApplication>();
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
abilitythread->abilityImpl_ = std::make_shared<AbilityRuntime::UIAbilityImpl>();
|
||||
@@ -937,7 +927,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_CreateAndInitContextDeal_0100, Func
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto ret = abilitythread->CreateAndInitContextDeal(application, abilityRecord, nullptr);
|
||||
EXPECT_EQ(ret, nullptr);
|
||||
GTEST_LOG_(INFO) << "AbilityRuntime_CreateAndInitContextDeal_0100 end";
|
||||
@@ -959,7 +949,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_CreateAndInitContextDeal_0200, Func
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = std::make_shared<AppExecFwk::AbilityContext>();
|
||||
auto ret = abilitythread->CreateAndInitContextDeal(application, abilityRecord, abilityObject);
|
||||
EXPECT_NE(ret, nullptr);
|
||||
@@ -982,7 +972,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_CreateAndInitContextDeal_0300, Func
|
||||
abilityInfo->name = "MockPageAbility";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::AbilityContext> abilityObject = std::make_shared<AppExecFwk::AbilityContext>();
|
||||
auto ret = abilitythread->CreateAndInitContextDeal(nullptr, abilityRecord, abilityObject);
|
||||
EXPECT_EQ(ret, nullptr);
|
||||
@@ -1026,7 +1016,7 @@ HWTEST_F(UIAbilityThreadTest, AbilityRuntime_Attach_0100, Function | MediumTest
|
||||
abilityInfo->name = "";
|
||||
abilityInfo->type = AbilityType::PAGE;
|
||||
sptr<IRemoteObject> token = sptr<IRemoteObject>(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto abilityRecord = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
std::shared_ptr<EventRunner> mainRunner = EventRunner::Create(abilityInfo->name);
|
||||
abilitythread->Attach(application, abilityRecord, mainRunner, nullptr);
|
||||
auto ret = abilitythread->CreateAbilityName(abilityRecord);
|
||||
|
||||
@@ -115,6 +115,7 @@ ohos_unittest("application_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -174,6 +175,7 @@ ohos_unittest("context_impl_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:uiabilitykit_native",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
@@ -226,6 +228,7 @@ ohos_unittest("context_container_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -415,6 +418,7 @@ ohos_unittest("context_deal_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -473,6 +477,7 @@ ohos_unittest("application_impl_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
"${ability_runtime_native_path}/appkit:appkit_native",
|
||||
@@ -609,6 +614,7 @@ ohos_unittest("form_extension_context_test") {
|
||||
"${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
|
||||
"${ability_runtime_native_path}/ability/native:ability_thread",
|
||||
"${ability_runtime_native_path}/ability/native:abilitykit_native",
|
||||
"${ability_runtime_native_path}/ability/native:configuration_helper",
|
||||
"${ability_runtime_native_path}/ability/native:form_extension",
|
||||
"${ability_runtime_native_path}/appkit:app_context",
|
||||
"${ability_runtime_native_path}/appkit:appkit_manager_helper",
|
||||
|
||||
@@ -143,7 +143,7 @@ HWTEST_F(AbilityStageTest, AppExecFwk_AbilityStage_AddAbility_002, Function | Me
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_002 start";
|
||||
sptr<IRemoteObject> token = new (std::nothrow) MockToken();
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_002 111";
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr));
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0));
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_002 222";
|
||||
EXPECT_TRUE(abilityStage_->ContainsAbility());
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_002 end";
|
||||
@@ -160,7 +160,7 @@ HWTEST_F(AbilityStageTest, AppExecFwk_AbilityStage_AddAbility_003, Function | Me
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_003 start";
|
||||
EXPECT_FALSE(abilityStage_->ContainsAbility());
|
||||
abilityStage_->AddAbility(nullptr, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr));
|
||||
abilityStage_->AddAbility(nullptr, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0));
|
||||
EXPECT_FALSE(abilityStage_->ContainsAbility());
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_AddAbility_003 end";
|
||||
}
|
||||
@@ -209,7 +209,7 @@ HWTEST_F(AbilityStageTest, AppExecFwk_AbilityStage_RemoveAbility_002, Function |
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_RemoveAbility_002 start";
|
||||
sptr<IRemoteObject> token = new MockToken();
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr));
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0));
|
||||
EXPECT_TRUE(abilityStage_->ContainsAbility());
|
||||
abilityStage_->RemoveAbility(token);
|
||||
EXPECT_FALSE(abilityStage_->ContainsAbility());
|
||||
@@ -241,7 +241,7 @@ HWTEST_F(AbilityStageTest, AppExecFwk_AbilityStage_ContainsAbility_002, Function
|
||||
{
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_ContainsAbility_002 start";
|
||||
sptr<IRemoteObject> token = new MockToken();
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr));
|
||||
abilityStage_->AddAbility(token, std::make_shared<AppExecFwk::AbilityLocalRecord>(nullptr, nullptr, nullptr, 0));
|
||||
EXPECT_TRUE(abilityStage_->ContainsAbility());
|
||||
GTEST_LOG_(INFO) << "AppExecFwk_AbilityStage_ContainsAbility_002 end";
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void JsAutoFillExtensionTest::CreateJsAutoFillExtension()
|
||||
{
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityRuntime::ContextImpl> contextImpl = std::make_shared<AbilityRuntime::ContextImpl>();
|
||||
|
||||
@@ -91,7 +91,7 @@ void JsServiceExtensionTest::CreateJsServiceExtension()
|
||||
{
|
||||
std::shared_ptr<AbilityInfo> abilityInfo = std::make_shared<AbilityInfo>();
|
||||
sptr<IRemoteObject> token(new (std::nothrow) MockAbilityToken());
|
||||
std::shared_ptr<AbilityLocalRecord> record = std::make_shared<AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
|
||||
std::shared_ptr<OHOSApplication> application = std::make_shared<OHOSApplication>();
|
||||
std::shared_ptr<AbilityRuntime::ContextImpl> contextImpl = std::make_shared<AbilityRuntime::ContextImpl>();
|
||||
|
||||
@@ -104,8 +104,7 @@ void JsUIServiceExtensionTest::SetUp()
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "JsUIServiceExtensionTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
|
||||
@@ -84,7 +84,7 @@ HWTEST_F(PhotoEditorExtensionTest, PhotoEditor_Extension_0300, Function | Medium
|
||||
GTEST_LOG_(INFO) << "PhotoEditor_Extension_0300 start";
|
||||
auto abilityInfo = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(abilityInfo, token, nullptr, 0);
|
||||
auto application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
auto contextImpl = std::make_shared<ContextImpl>();
|
||||
auto applicationContext = ApplicationContext::GetInstance();
|
||||
|
||||
@@ -97,8 +97,7 @@ HWTEST_F(UIServiceExtensionTest, CreateAndInitContext_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "UIServiceExtensionTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
@@ -125,8 +124,7 @@ HWTEST_F(UIServiceExtensionTest, Init_0100, TestSize.Level1)
|
||||
|
||||
std::shared_ptr<AppExecFwk::AbilityInfo> info = std::make_shared<AppExecFwk::AbilityInfo>();
|
||||
info->name = "UIServiceExtensionTest";
|
||||
std::shared_ptr<AppExecFwk::AbilityLocalRecord> record =
|
||||
std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr);
|
||||
auto record = std::make_shared<AppExecFwk::AbilityLocalRecord>(info, nullptr, nullptr, 0);
|
||||
std::shared_ptr<AppExecFwk::OHOSApplication> application = std::make_shared<AppExecFwk::OHOSApplication>();
|
||||
std::shared_ptr<AppExecFwk::AbilityHandler> handler = std::make_shared<AppExecFwk::AbilityHandler>(nullptr);
|
||||
sptr<IRemoteObject> token = new AppExecFwk::MockAbilityToken();
|
||||
|
||||
Reference in New Issue
Block a user