diff --git a/frameworks/native/appkit/ability_delegator/runner_runtime/js_test_runner.cpp b/frameworks/native/appkit/ability_delegator/runner_runtime/js_test_runner.cpp index 21c467cac874f2bd13de43047422f8c6059e9dc7..09ca16faabe0def68f45c8baf88bb65705488e02 100644 --- a/frameworks/native/appkit/ability_delegator/runner_runtime/js_test_runner.cpp +++ b/frameworks/native/appkit/ability_delegator/runner_runtime/js_test_runner.cpp @@ -23,7 +23,7 @@ extern const char _binary_delegator_mgmt_abc_end[]; namespace OHOS { namespace RunnerRuntime { std::unique_ptr JsTestRunner::Create(const std::unique_ptr &runtime, - const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel) + const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel, bool isStage) { if (!runtime) { HILOG_ERROR("Invalid runtime"); @@ -36,7 +36,7 @@ std::unique_ptr JsTestRunner::Create(const std::unique_ptr } auto pTestRunner = new (std::nothrow) JsTestRunner(static_cast(*runtime), args, bundleInfo, - isFaJsModel); + isFaJsModel, isStage); if (!pTestRunner) { HILOG_ERROR("Failed to create test runner"); return nullptr; @@ -47,7 +47,7 @@ std::unique_ptr JsTestRunner::Create(const std::unique_ptr JsTestRunner::JsTestRunner( JsRuntime &jsRuntime, const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, - bool isFaJsModel) + bool isFaJsModel, bool isStage) : jsRuntime_(jsRuntime), isFaJsModel_(isFaJsModel) { std::string moduleName; @@ -56,12 +56,24 @@ JsTestRunner::JsTestRunner( if (bundleInfo.hapModuleInfos.back().isModuleJson) { srcPath.append(args->GetTestModuleName()); if (args->GetTestRunnerClassName().find("/") == std::string::npos) { - srcPath.append("/ets/TestRunner/"); + if (isStage) { + HILOG_INFO("stage module"); + srcPath.append("/ets/testrunner/"); + } else { + HILOG_INFO("FA module"); + srcPath.append("/ets/TestRunner/"); + } } moduleName = args->GetTestModuleName(); } else { srcPath.append(args->GetTestPackageName()); - srcPath.append("/assets/js/TestRunner/"); + if (isStage) { + HILOG_INFO("stage module"); + srcPath.append("/assets/js/testrunner/"); + } else { + HILOG_INFO("FA module"); + srcPath.append("/assets/js/TestRunner/"); + } moduleName = args->GetTestPackageName(); } srcPath.append(args->GetTestRunnerClassName()); diff --git a/frameworks/native/appkit/ability_delegator/test_runner.cpp b/frameworks/native/appkit/ability_delegator/test_runner.cpp index 25d799683e4c2d3ae9311b2d98fb72112f3ffeba..604795de5400e0edb9e35cdf23fd1400a2d962c3 100644 --- a/frameworks/native/appkit/ability_delegator/test_runner.cpp +++ b/frameworks/native/appkit/ability_delegator/test_runner.cpp @@ -24,7 +24,7 @@ namespace OHOS { namespace AppExecFwk { std::unique_ptr TestRunner::Create(const std::unique_ptr &runtime, - const std::shared_ptr &args, bool isFaJsModel) + const std::shared_ptr &args, bool isFaJsModel, bool isStage) { if (!runtime) { return std::make_unique(); @@ -63,7 +63,7 @@ std::unique_ptr TestRunner::Create(const std::unique_ptrGetLanguage()) { case AbilityRuntime::Runtime::Language::JS: - return RunnerRuntime::JsTestRunner::Create(runtime, args, bundleInfo, isFaJsModel); + return RunnerRuntime::JsTestRunner::Create(runtime, args, bundleInfo, isFaJsModel, isStage); default: return std::make_unique(); } diff --git a/frameworks/native/appkit/app/main_thread.cpp b/frameworks/native/appkit/app/main_thread.cpp index 5239b24471dc0391cd2f21e5991e57871d74620d..9756e76acea9fcfb6a0a36f15dfdd4f1528d2bcc 100644 --- a/frameworks/native/appkit/app/main_thread.cpp +++ b/frameworks/native/appkit/app/main_thread.cpp @@ -1610,7 +1610,7 @@ bool MainThread::PrepareAbilityDelegator(const std::shared_ptr & auto args = std::make_shared(record->want); if (isStageBased) { // Stage model HILOG_DEBUG("PrepareAbilityDelegator for Stage model."); - auto testRunner = TestRunner::Create(application_->GetRuntime(), args, false); + auto testRunner = TestRunner::Create(application_->GetRuntime(), args, false, true); auto delegator = std::make_shared( application_->GetAppContext(), std::move(testRunner), record->observer); AbilityDelegatorRegistry::RegisterInstance(delegator, args); @@ -1633,7 +1633,7 @@ bool MainThread::PrepareAbilityDelegator(const std::shared_ptr & } bool isFaJsModel = entryHapModuleInfo.abilityInfos.front().srcLanguage == "js" ? true : false; static auto runtime = AbilityRuntime::Runtime::Create(options); - auto testRunner = TestRunner::Create(runtime, args, isFaJsModel); + auto testRunner = TestRunner::Create(runtime, args, isFaJsModel, false); if (testRunner == nullptr) { HILOG_ERROR("Failed to Create testRunner"); return false; diff --git a/interfaces/kits/native/appkit/ability_delegator/runner_runtime/js_test_runner.h b/interfaces/kits/native/appkit/ability_delegator/runner_runtime/js_test_runner.h index 11a7e22f0b3808ba06e75327484ad74cd01a682d..cc4c73dcc4b5f165a9ec2b34211a09308c20c988 100644 --- a/interfaces/kits/native/appkit/ability_delegator/runner_runtime/js_test_runner.h +++ b/interfaces/kits/native/appkit/ability_delegator/runner_runtime/js_test_runner.h @@ -39,7 +39,7 @@ public: * @return the TestRunner object if JsTestRunner object is created successfully; returns null otherwise. */ static std::unique_ptr Create(const std::unique_ptr &runtime, - const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel); + const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel, bool isStage); /** * Default deconstructor used to deconstruct. @@ -60,7 +60,7 @@ public: private: JsTestRunner(JsRuntime &jsRuntime, - const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel); + const std::shared_ptr &args, const AppExecFwk::BundleInfo &bundleInfo, bool isFaJsModel, bool isStage); void CallObjectMethod(const char *name, NativeValue *const *argv = nullptr, size_t argc = 0); void ReportFinished(const std::string &msg); diff --git a/interfaces/kits/native/appkit/ability_delegator/test_runner.h b/interfaces/kits/native/appkit/ability_delegator/test_runner.h index 9cb46a2cb0dbcd6049a64d1b5b6ed73c07b0ee50..0c2aba2548bc3a85f034f56dee6fb4b9bd0c4421 100644 --- a/interfaces/kits/native/appkit/ability_delegator/test_runner.h +++ b/interfaces/kits/native/appkit/ability_delegator/test_runner.h @@ -35,7 +35,7 @@ public: * @return the TestRunner object if TestRunner object is created successfully; returns null otherwise. */ static std::unique_ptr Create(const std::unique_ptr &runtime, - const std::shared_ptr &args, bool isFaJsModel); + const std::shared_ptr &args, bool isFaJsModel, bool isStage); /** * Default constructor used to create a TestRunner instance. diff --git a/test/moduletest/ability_delegator_test/ability_delegator_module_test.cpp b/test/moduletest/ability_delegator_test/ability_delegator_module_test.cpp index 99433df9c44cd5d83ac637dda5fe7252aba2b58a..dd9217a2b807cead506e00d6dad86bd308bfecbc 100644 --- a/test/moduletest/ability_delegator_test/ability_delegator_module_test.cpp +++ b/test/moduletest/ability_delegator_test/ability_delegator_module_test.cpp @@ -166,6 +166,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0100, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -205,6 +206,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0200, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -240,6 +242,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0300, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -278,6 +281,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0400, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -311,6 +315,7 @@ HWTEST_F(AbilityDelegatorModuleTest2, Ability_Delegator_Args_Test_0500, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -342,7 +347,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0600, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -374,7 +379,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0700, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -406,7 +411,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0800, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -438,7 +443,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_0900, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -471,7 +476,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1000, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -509,7 +514,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1100, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr token = sptr(new MockAbilityDelegatorStub); @@ -546,7 +551,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1200, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -585,7 +590,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1300, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -624,7 +629,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1400, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -657,7 +662,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1500, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -696,7 +701,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1600, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -729,7 +734,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1700, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -768,7 +773,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1800, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -801,7 +806,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_1900, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -840,7 +845,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2000, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -879,7 +884,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2100, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -918,7 +923,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2200, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -957,7 +962,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2300, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -999,7 +1004,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2400, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -1044,7 +1049,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2500, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -1086,7 +1091,7 @@ HWTEST_F(AbilityDelegatorModuleTest, Ability_Delegator_Args_Test_2600, Function std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); diff --git a/test/moduletest/ability_delegator_test/ability_delegator_registry_module_test.cpp b/test/moduletest/ability_delegator_test/ability_delegator_registry_module_test.cpp index 709e8e3ec1b74a953995ce4bfd88f90539615a8d..72b7596735bac70583d93e46d0670f6c19e121a2 100644 --- a/test/moduletest/ability_delegator_test/ability_delegator_registry_module_test.cpp +++ b/test/moduletest/ability_delegator_test/ability_delegator_registry_module_test.cpp @@ -83,6 +83,7 @@ HWTEST_F(AbilityDelegatorRegistryModuleTest, std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, + true, true); std::shared_ptr abilityDelegator = std::make_shared(nullptr, std::move(testRunner), nullptr); diff --git a/test/moduletest/ability_delegator_test/js_test_runner_module_test.cpp b/test/moduletest/ability_delegator_test/js_test_runner_module_test.cpp index 36c682e7d723fa9996ec45455a3021b5aa70adb1..ff15dd2c2d7dae61d7efd3d7de7c7ca0fb9db086 100644 --- a/test/moduletest/ability_delegator_test/js_test_runner_module_test.cpp +++ b/test/moduletest/ability_delegator_test/js_test_runner_module_test.cpp @@ -120,7 +120,7 @@ HWTEST_F(JsTestRunnerModuleTest, Js_Test_Runner_Module_Test_0100, Function | Med std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -159,7 +159,7 @@ HWTEST_F(JsTestRunnerModuleTest, Js_Test_Runner_Module_Test_0200, Function | Med std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); diff --git a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_registry_test.cpp b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_registry_test.cpp index 1116c969055f2230eb6ee7e27af359be0aab74e8..f0f3d6082ca0357a0fa70689242507c9db0bb8bf 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_registry_test.cpp +++ b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_registry_test.cpp @@ -93,7 +93,7 @@ HWTEST_F(AbilityDelegatorRegistryTest, Ability_Delegator_Registry_Test_0100, Fun } std::shared_ptr abilityArgs = std::make_shared(want); - std::unique_ptr testRunner = TestRunner::Create(nullptr, abilityArgs, true); + std::unique_ptr testRunner = TestRunner::Create(nullptr, abilityArgs, true, true); std::shared_ptr abilityDelegator = std::make_shared(nullptr, std::move(testRunner), nullptr); AbilityDelegatorRegistry::RegisterInstance(abilityDelegator, abilityArgs); diff --git a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_test.cpp b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_test.cpp index 0867f3c77c00b3319b95c7bfdb3024f677a5158d..78bacaa727343e89ea9038b23fbaeb1c8bd3af8a 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_test.cpp +++ b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/ability_delegator_test.cpp @@ -112,7 +112,7 @@ void AbilityDelegatorTest::SetUpTestCase() delegatorArgs_ = std::make_shared(want); AbilityRuntime::Runtime::Options options; - auto testRunner = TestRunner::Create(AbilityRuntime::Runtime::Create(options), delegatorArgs_, true); + auto testRunner = TestRunner::Create(AbilityRuntime::Runtime::Create(options), delegatorArgs_, true, true); commonDelegator_ = std::make_shared(std::make_shared(), std::move(testRunner), sptr(new AAFwk::MockTestObserverStub)); } @@ -203,7 +203,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0100, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -242,7 +242,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0200, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -277,7 +277,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0300, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -307,7 +307,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0400, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -339,7 +339,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0500, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -377,7 +377,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0600, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -410,7 +410,7 @@ HWTEST_F(AbilityDelegatorTest2, Ability_Delegator_Test_070, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr token = sptr(new MockAbilityDelegatorStub2); @@ -459,7 +459,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_0800, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -491,7 +491,7 @@ HWTEST_F(AbilityDelegatorTest2, Ability_Delegator_Test_0900, Function | MediumTe std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -523,7 +523,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1000, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -553,7 +553,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1100, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -585,7 +585,7 @@ HWTEST_F(AbilityDelegatorTest2, Ability_Delegator_Test_1200, Function | MediumTe std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -617,7 +617,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1300, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -647,7 +647,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1400, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -677,7 +677,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1500, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.observer_ = nullptr; @@ -708,7 +708,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1600, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -740,7 +740,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1700, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -773,7 +773,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1800, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -806,7 +806,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_1900, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -845,7 +845,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2000, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr token = sptr(new MockAbilityDelegatorStub); @@ -883,7 +883,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2100, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -916,7 +916,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2200, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -956,7 +956,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_23400, Function | MediumTe std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -989,7 +989,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2400, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1029,7 +1029,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2500, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1062,7 +1062,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2600, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1102,7 +1102,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2700, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1135,7 +1135,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2800, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1175,7 +1175,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_2900, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::shared_ptr mockMonitor = std::make_shared(ABILITY_NAME); @@ -1208,7 +1208,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3000, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -1248,7 +1248,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3100, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -1287,7 +1287,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3200, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -1327,7 +1327,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3300, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -1366,7 +1366,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3400, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.abilityMonitors_.clear(); @@ -1409,7 +1409,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3500, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -1454,7 +1454,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3600, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub2); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -1497,7 +1497,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3700, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -1528,7 +1528,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3800, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -1559,7 +1559,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_3900, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -1590,7 +1590,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4000, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -1621,7 +1621,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4100, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); @@ -1653,7 +1653,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4200, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.testRunner_ = nullptr; @@ -1686,7 +1686,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4300, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::unique_ptr tptr{ new MockTestRunner }; @@ -1720,7 +1720,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4400, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); abilityDelegator.testRunner_ = nullptr; @@ -1753,7 +1753,7 @@ HWTEST_F(AbilityDelegatorTest, Ability_Delegator_Test_4500, Function | MediumTes std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new AAFwk::MockTestObserverStub); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); std::unique_ptr tptr{ new MockTestRunner }; @@ -1837,7 +1837,7 @@ HWTEST_F(AbilityDelegatorTest, InputParamTest_0100, TestSize.Level1) AbilityRuntime::Runtime::Options options; AAFwk::Want want; auto testRunner = TestRunner::Create(AbilityRuntime::Runtime::Create(options), - std::make_shared(want), true); + std::make_shared(want), true, true); auto delegator = std::make_shared(std::make_shared(), std::move(testRunner), nullptr); std::string msg(""); diff --git a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/js_test_runner_test.cpp b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/js_test_runner_test.cpp index fe0db706d9cd1ae8111adba64fb6698947bd18be..6d8b5fcf08c82b113683eda0dbc90565cbd5b77c 100644 --- a/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/js_test_runner_test.cpp +++ b/test/unittest/frameworks_kits_appkit_native_test/ability_delegator/js_test_runner_test.cpp @@ -146,7 +146,7 @@ HWTEST_F(JsTestRunnerTest, Js_Test_Runner_Test_0200, Function | MediumTest | Lev std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); EXPECT_TRUE(testRunner->Initialize()); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = @@ -187,7 +187,7 @@ HWTEST_F(JsTestRunnerTest, Js_Test_Runner_Test_0300, Function | MediumTest | Lev std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), std::make_shared(want), - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub()); AbilityDelegator abilityDelegator(context, std::move(testRunner), iRemoteObj); sptr shobserver = sptr(new MockTestObserverStub); @@ -226,7 +226,7 @@ HWTEST_F(JsTestRunnerTest, Js_Test_Runner_Test_0400, Function | MediumTest | Lev std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -268,7 +268,7 @@ HWTEST_F(JsTestRunnerTest, Js_Test_Runner_Test_0500, Function | MediumTest | Lev std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj); @@ -307,7 +307,7 @@ HWTEST_F(JsTestRunnerTest, Js_Test_Runner_Test_0600, Function | MediumTest | Lev std::unique_ptr testRunner = TestRunner::Create( std::shared_ptr(ApplicationLoader::GetInstance().GetApplicationByName())->GetRuntime(), abilityArgs, - true); + true, true); sptr iRemoteObj = sptr(new MockAbilityDelegatorStub); std::shared_ptr abilityDelegator = std::make_shared(context, std::move(testRunner), iRemoteObj);