diff --git a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp index 2fb9479bde113d9eaa96cbc01f47232c88285fef..e052bd6285af04f1699f6534f39bb5e217392a19 100644 --- a/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp +++ b/interfaces/kits/napi/window_runtime/window_napi/js_window.cpp @@ -8990,12 +8990,12 @@ napi_value JsWindow::OnSetRelativePositionToParentWindowEnabled(napi_env env, na int32_t offsetX = 0; if (argc > INDEX_TWO && !ConvertFromJsValue(env, argv[INDEX_TWO], offsetX)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetX"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); } int32_t offsetY = 0; if (argc > INDEX_THREE && !ConvertFromJsValue(env, argv[INDEX_THREE], offsetY)) { TLOGE(WmsLogTag::WMS_SUB, "Failed to convert parameter to offsetY"); - return NapiThrowError(env, WmErrorCode::WM_ERROR_INVALID_PARAM); + return NapiThrowError(env, WmErrorCode::WM_ERROR_ILLEGAL_PARAM); } const char* const where = __func__; napi_value result = nullptr; diff --git a/window_scene/test/unittest/scene_session_manager_test3.cpp b/window_scene/test/unittest/scene_session_manager_test3.cpp index 313944928acb22b50d371323b22d2f49cc7a605b..36f02e416ed1de216e7effb253d2baf5d5c25557 100644 --- a/window_scene/test/unittest/scene_session_manager_test3.cpp +++ b/window_scene/test/unittest/scene_session_manager_test3.cpp @@ -1184,8 +1184,8 @@ HWTEST_F(SceneSessionManagerTest3, UpdateForceHideState, TestSize.Level1) SessionInfo info; info.abilityName_ = "UpdateForceHideState"; info.bundleName_ = "UpdateForceHideState"; - sptr sceneSession = sptr::MakeSptr(info, nullptr); - sptr property = sptr::MakeSptr(); + sptr sceneSession = sptr::MakeSptr(info, nullptr); + sptr property = sptr::MakeSptr(); ssm_->systemConfig_.windowUIType_ = WindowUIType::PAD_WINDOW; property->SetHideNonSystemFloatingWindows(true); sceneSession->property_->windowMode_ = WindowMode::WINDOW_MODE_PIP;