1e0dac50fSopenharmony_ci/* 2e0dac50fSopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 3e0dac50fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4e0dac50fSopenharmony_ci * you may not use this file except in compliance with the License. 5e0dac50fSopenharmony_ci * You may obtain a copy of the License at 6e0dac50fSopenharmony_ci * 7e0dac50fSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8e0dac50fSopenharmony_ci * 9e0dac50fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10e0dac50fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11e0dac50fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12e0dac50fSopenharmony_ci * See the License for the specific language governing permissions and 13e0dac50fSopenharmony_ci * limitations under the License. 14e0dac50fSopenharmony_ci */ 15e0dac50fSopenharmony_ci 16e0dac50fSopenharmony_ci#include <gtest/gtest.h> 17e0dac50fSopenharmony_ci 18e0dac50fSopenharmony_ci#include "window_property.h" 19e0dac50fSopenharmony_ci#include "wm_common_inner.h" 20e0dac50fSopenharmony_ci 21e0dac50fSopenharmony_ciusing namespace testing; 22e0dac50fSopenharmony_ciusing namespace testing::ext; 23e0dac50fSopenharmony_ci 24e0dac50fSopenharmony_cinamespace OHOS { 25e0dac50fSopenharmony_cinamespace Rosen { 26e0dac50fSopenharmony_ciclass WindowPropertyTest : public testing::Test { 27e0dac50fSopenharmony_cipublic: 28e0dac50fSopenharmony_ci static void SetUpTestCase(); 29e0dac50fSopenharmony_ci static void TearDownTestCase(); 30e0dac50fSopenharmony_ci virtual void SetUp() override; 31e0dac50fSopenharmony_ci virtual void TearDown() override; 32e0dac50fSopenharmony_ci}; 33e0dac50fSopenharmony_ci 34e0dac50fSopenharmony_civoid WindowPropertyTest::SetUpTestCase() 35e0dac50fSopenharmony_ci{ 36e0dac50fSopenharmony_ci} 37e0dac50fSopenharmony_ci 38e0dac50fSopenharmony_civoid WindowPropertyTest::TearDownTestCase() 39e0dac50fSopenharmony_ci{ 40e0dac50fSopenharmony_ci} 41e0dac50fSopenharmony_ci 42e0dac50fSopenharmony_civoid WindowPropertyTest::SetUp() 43e0dac50fSopenharmony_ci{ 44e0dac50fSopenharmony_ci} 45e0dac50fSopenharmony_ci 46e0dac50fSopenharmony_civoid WindowPropertyTest::TearDown() 47e0dac50fSopenharmony_ci{ 48e0dac50fSopenharmony_ci} 49e0dac50fSopenharmony_ci 50e0dac50fSopenharmony_cinamespace { 51e0dac50fSopenharmony_ci/** 52e0dac50fSopenharmony_ci * @tc.name: MarshallingUnmarshalling 53e0dac50fSopenharmony_ci * @tc.desc: Marshalling Unmarshalling test 54e0dac50fSopenharmony_ci * @tc.type: FUNC 55e0dac50fSopenharmony_ci */ 56e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, MarshallingUnmarshalling, Function | SmallTest | Level2) 57e0dac50fSopenharmony_ci{ 58e0dac50fSopenharmony_ci WindowProperty winPropSrc; 59e0dac50fSopenharmony_ci winPropSrc.SetPrivacyMode(true); 60e0dac50fSopenharmony_ci winPropSrc.SetTransparent(true); 61e0dac50fSopenharmony_ci winPropSrc.SetTransform(Transform::Identity()); 62e0dac50fSopenharmony_ci 63e0dac50fSopenharmony_ci Parcel parcel; 64e0dac50fSopenharmony_ci winPropSrc.Marshalling(parcel); 65e0dac50fSopenharmony_ci WindowProperty* winPropDst = winPropSrc.Unmarshalling(parcel); 66e0dac50fSopenharmony_ci 67e0dac50fSopenharmony_ci ASSERT_EQ(winPropDst->GetPrivacyMode(), true); 68e0dac50fSopenharmony_ci ASSERT_EQ(winPropDst->GetTransparent(), true); 69e0dac50fSopenharmony_ci ASSERT_EQ(winPropDst->GetTransform(), Transform::Identity()); 70e0dac50fSopenharmony_ci delete winPropDst; 71e0dac50fSopenharmony_ci} 72e0dac50fSopenharmony_ci 73e0dac50fSopenharmony_ci/** 74e0dac50fSopenharmony_ci * @tc.name: CopyFrom 75e0dac50fSopenharmony_ci * @tc.desc: CopyFrom test 76e0dac50fSopenharmony_ci * @tc.type: FUNC 77e0dac50fSopenharmony_ci */ 78e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, CopyFrom, Function | SmallTest | Level2) 79e0dac50fSopenharmony_ci{ 80e0dac50fSopenharmony_ci const sptr<WindowProperty> winPropSrc = new(std::nothrow) WindowProperty(); 81e0dac50fSopenharmony_ci winPropSrc->SetPrivacyMode(true); 82e0dac50fSopenharmony_ci winPropSrc->SetTransparent(true); 83e0dac50fSopenharmony_ci winPropSrc->SetTransform(Transform::Identity()); 84e0dac50fSopenharmony_ci 85e0dac50fSopenharmony_ci WindowProperty winPropDst(winPropSrc); // winPropDst.CopyFrom(winPropSrc); 86e0dac50fSopenharmony_ci 87e0dac50fSopenharmony_ci ASSERT_EQ(winPropSrc->GetPrivacyMode(), winPropDst.GetPrivacyMode()); 88e0dac50fSopenharmony_ci ASSERT_EQ(winPropSrc->GetTransparent(), winPropDst.GetTransparent()); 89e0dac50fSopenharmony_ci ASSERT_EQ(winPropSrc->GetTransform(), winPropDst.GetTransform()); 90e0dac50fSopenharmony_ci} 91e0dac50fSopenharmony_ci 92e0dac50fSopenharmony_ci/** 93e0dac50fSopenharmony_ci * @tc.name: Read 94e0dac50fSopenharmony_ci * @tc.desc: Read test 95e0dac50fSopenharmony_ci * @tc.type: FUNC 96e0dac50fSopenharmony_ci */ 97e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, Read, Function | SmallTest | Level2) 98e0dac50fSopenharmony_ci{ 99e0dac50fSopenharmony_ci WindowProperty winPropSrc; 100e0dac50fSopenharmony_ci winPropSrc.SetPrivacyMode(true); 101e0dac50fSopenharmony_ci winPropSrc.SetTransparent(true); 102e0dac50fSopenharmony_ci 103e0dac50fSopenharmony_ci Parcel parcel; 104e0dac50fSopenharmony_ci winPropSrc.Marshalling(parcel); 105e0dac50fSopenharmony_ci 106e0dac50fSopenharmony_ci WindowProperty winPropDst; 107e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_RECT); 108e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_MODE); 109e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_FLAGS); 110e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_OTHER_PROPS); 111e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_FOCUSABLE); 112e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_TOUCHABLE); 113e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_CALLING_WINDOW); 114e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_ORIENTATION); 115e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_TURN_SCREEN_ON); 116e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_KEEP_SCREEN_ON); 117e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_SET_BRIGHTNESS); 118e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_MODE_SUPPORT_INFO); 119e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_TOUCH_HOT_AREA); 120e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_TRANSFORM_PROPERTY); 121e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_ANIMATION_FLAG); 122e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_PRIVACY_MODE); 123e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_SYSTEM_PRIVACY_MODE); 124e0dac50fSopenharmony_ci 125e0dac50fSopenharmony_ci ASSERT_EQ(false, winPropDst.GetPrivacyMode()); 126e0dac50fSopenharmony_ci ASSERT_EQ(false, winPropDst.GetTransparent()); 127e0dac50fSopenharmony_ci} 128e0dac50fSopenharmony_ci 129e0dac50fSopenharmony_ci/** 130e0dac50fSopenharmony_ci * @tc.name: Write 131e0dac50fSopenharmony_ci * @tc.desc: Write test 132e0dac50fSopenharmony_ci * @tc.type: FUNC 133e0dac50fSopenharmony_ci */ 134e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, Write, Function | SmallTest | Level2) 135e0dac50fSopenharmony_ci{ 136e0dac50fSopenharmony_ci Parcel parcel; 137e0dac50fSopenharmony_ci WindowProperty winPropDst; 138e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_RECT)); 139e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_MODE)); 140e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_FLAGS)); 141e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_OTHER_PROPS)); 142e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_FOCUSABLE)); 143e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_TOUCHABLE)); 144e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_CALLING_WINDOW)); 145e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_ORIENTATION)); 146e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_TURN_SCREEN_ON)); 147e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_KEEP_SCREEN_ON)); 148e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_SET_BRIGHTNESS)); 149e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_MODE_SUPPORT_INFO)); 150e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_TOUCH_HOT_AREA)); 151e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_TRANSFORM_PROPERTY)); 152e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_ANIMATION_FLAG)); 153e0dac50fSopenharmony_ci} 154e0dac50fSopenharmony_ci 155e0dac50fSopenharmony_ci/** 156e0dac50fSopenharmony_ci * @tc.name: SetAbilityInfo 157e0dac50fSopenharmony_ci * @tc.desc: Test SetAbilityInfo and GetAbilityInfo 158e0dac50fSopenharmony_ci * @tc.type: FUNC 159e0dac50fSopenharmony_ci */ 160e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, SetAbilityInfo, Function | SmallTest | Level2) 161e0dac50fSopenharmony_ci{ 162e0dac50fSopenharmony_ci WindowProperty winPropDst; 163e0dac50fSopenharmony_ci AbilityInfo info; 164e0dac50fSopenharmony_ci info.bundleName_ = "testBundleName"; 165e0dac50fSopenharmony_ci info.abilityName_ = "testAbilityName"; 166e0dac50fSopenharmony_ci winPropDst.SetAbilityInfo(info); 167e0dac50fSopenharmony_ci ASSERT_EQ("testBundleName", winPropDst.GetAbilityInfo().bundleName_); 168e0dac50fSopenharmony_ci ASSERT_EQ("testAbilityName", winPropDst.GetAbilityInfo().abilityName_); 169e0dac50fSopenharmony_ci} 170e0dac50fSopenharmony_ci 171e0dac50fSopenharmony_ci/** 172e0dac50fSopenharmony_ci * @tc.name: ResumeLastWindowMode 173e0dac50fSopenharmony_ci * @tc.desc: Test ResumeLastWindowMode 174e0dac50fSopenharmony_ci * @tc.type: FUNC 175e0dac50fSopenharmony_ci */ 176e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, ResumeLastWindowMode, Function | SmallTest | Level2) 177e0dac50fSopenharmony_ci{ 178e0dac50fSopenharmony_ci WindowProperty winPropDst; 179e0dac50fSopenharmony_ci winPropDst.modeSupportInfo_ = WindowModeSupport::WINDOW_MODE_SUPPORT_PIP; 180e0dac50fSopenharmony_ci winPropDst.lastMode_ = WindowMode::WINDOW_MODE_PIP; 181e0dac50fSopenharmony_ci winPropDst.mode_ = WindowMode::WINDOW_MODE_UNDEFINED; 182e0dac50fSopenharmony_ci winPropDst.ResumeLastWindowMode(); 183e0dac50fSopenharmony_ci ASSERT_EQ(WindowMode::WINDOW_MODE_PIP, winPropDst.mode_); 184e0dac50fSopenharmony_ci 185e0dac50fSopenharmony_ci winPropDst.modeSupportInfo_ = WindowModeSupport::WINDOW_MODE_SUPPORT_SPLIT_SECONDARY; 186e0dac50fSopenharmony_ci winPropDst.lastMode_ = WindowMode::WINDOW_MODE_PIP; 187e0dac50fSopenharmony_ci winPropDst.mode_ = WindowMode::WINDOW_MODE_UNDEFINED; 188e0dac50fSopenharmony_ci winPropDst.ResumeLastWindowMode(); 189e0dac50fSopenharmony_ci ASSERT_EQ(WindowMode::WINDOW_MODE_UNDEFINED, winPropDst.mode_); 190e0dac50fSopenharmony_ci 191e0dac50fSopenharmony_ci winPropDst.modeSupportInfo_ = WindowModeSupport::WINDOW_MODE_SUPPORT_FLOATING; 192e0dac50fSopenharmony_ci winPropDst.lastMode_ = WindowMode::WINDOW_MODE_PIP; 193e0dac50fSopenharmony_ci winPropDst.mode_ = WindowMode::WINDOW_MODE_UNDEFINED; 194e0dac50fSopenharmony_ci winPropDst.ResumeLastWindowMode(); 195e0dac50fSopenharmony_ci ASSERT_EQ(WindowMode::WINDOW_MODE_FLOATING, winPropDst.mode_); 196e0dac50fSopenharmony_ci} 197e0dac50fSopenharmony_ci 198e0dac50fSopenharmony_ci/** 199e0dac50fSopenharmony_ci * @tc.name: AddWindowFlag001 200e0dac50fSopenharmony_ci * @tc.desc: AddWindowFlag test 201e0dac50fSopenharmony_ci * @tc.type: FUNC 202e0dac50fSopenharmony_ci */ 203e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, AddWindowFlag001, Function | SmallTest | Level2) 204e0dac50fSopenharmony_ci{ 205e0dac50fSopenharmony_ci WindowProperty winPropSrc; 206e0dac50fSopenharmony_ci int resultValue = 0; 207e0dac50fSopenharmony_ci WindowFlag flag = WindowFlag::WINDOW_FLAG_NEED_AVOID; 208e0dac50fSopenharmony_ci std::function<void()> func = [&]() { 209e0dac50fSopenharmony_ci winPropSrc.AddWindowFlag(flag); 210e0dac50fSopenharmony_ci resultValue = 1; 211e0dac50fSopenharmony_ci }; 212e0dac50fSopenharmony_ci func(); 213e0dac50fSopenharmony_ci ASSERT_EQ(resultValue, 1); 214e0dac50fSopenharmony_ci} 215e0dac50fSopenharmony_ci 216e0dac50fSopenharmony_ci/** 217e0dac50fSopenharmony_ci * @tc.name: GetRequestRect002 218e0dac50fSopenharmony_ci * @tc.desc: GetRequestRect test 219e0dac50fSopenharmony_ci * @tc.type: FUNC 220e0dac50fSopenharmony_ci */ 221e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetRequestRect001, Function | SmallTest | Level2) 222e0dac50fSopenharmony_ci{ 223e0dac50fSopenharmony_ci WindowProperty winPropSrc; 224e0dac50fSopenharmony_ci Rect requestRect { 0, 0, 0, 0 }; 225e0dac50fSopenharmony_ci winPropSrc.SetRequestRect(requestRect); 226e0dac50fSopenharmony_ci Rect res = winPropSrc.GetRequestRect(); 227e0dac50fSopenharmony_ci ASSERT_EQ(res, requestRect); 228e0dac50fSopenharmony_ci} 229e0dac50fSopenharmony_ci 230e0dac50fSopenharmony_ci/** 231e0dac50fSopenharmony_ci * @tc.name: GetWindowSizeChangeReason003 232e0dac50fSopenharmony_ci * @tc.desc: GetWindowSizeChangeReason test 233e0dac50fSopenharmony_ci * @tc.type: FUNC 234e0dac50fSopenharmony_ci */ 235e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetWindowSizeChangeReason003, Function | SmallTest | Level2) 236e0dac50fSopenharmony_ci{ 237e0dac50fSopenharmony_ci WindowProperty winPropSrc; 238e0dac50fSopenharmony_ci WindowSizeChangeReason reason = WindowSizeChangeReason::UNDEFINED; 239e0dac50fSopenharmony_ci winPropSrc.SetWindowSizeChangeReason(reason); 240e0dac50fSopenharmony_ci WindowSizeChangeReason res = winPropSrc.GetWindowSizeChangeReason(); 241e0dac50fSopenharmony_ci ASSERT_EQ(res, reason); 242e0dac50fSopenharmony_ci} 243e0dac50fSopenharmony_ci 244e0dac50fSopenharmony_ci/** 245e0dac50fSopenharmony_ci * @tc.name: GetFullScreen004 246e0dac50fSopenharmony_ci * @tc.desc: GetFullScreen test 247e0dac50fSopenharmony_ci * @tc.type: FUNC 248e0dac50fSopenharmony_ci */ 249e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetFullScreen004, Function | SmallTest | Level2) 250e0dac50fSopenharmony_ci{ 251e0dac50fSopenharmony_ci WindowProperty winPropSrc; 252e0dac50fSopenharmony_ci bool isFullScreen = true; 253e0dac50fSopenharmony_ci winPropSrc.SetFullScreen(isFullScreen); 254e0dac50fSopenharmony_ci bool res = winPropSrc.GetFullScreen(); 255e0dac50fSopenharmony_ci ASSERT_EQ(res, isFullScreen); 256e0dac50fSopenharmony_ci} 257e0dac50fSopenharmony_ci 258e0dac50fSopenharmony_ci/** 259e0dac50fSopenharmony_ci * @tc.name: GetFocusable005 260e0dac50fSopenharmony_ci * @tc.desc: GetFocusable test 261e0dac50fSopenharmony_ci * @tc.type: FUNC 262e0dac50fSopenharmony_ci */ 263e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetFocusable005, Function | SmallTest | Level2) 264e0dac50fSopenharmony_ci{ 265e0dac50fSopenharmony_ci WindowProperty winPropSrc; 266e0dac50fSopenharmony_ci bool isFocusable = true; 267e0dac50fSopenharmony_ci winPropSrc.SetFocusable(isFocusable); 268e0dac50fSopenharmony_ci bool res = winPropSrc.GetFocusable(); 269e0dac50fSopenharmony_ci ASSERT_EQ(res, isFocusable); 270e0dac50fSopenharmony_ci} 271e0dac50fSopenharmony_ci 272e0dac50fSopenharmony_ci/** 273e0dac50fSopenharmony_ci * @tc.name: GetTouchable006 274e0dac50fSopenharmony_ci * @tc.desc: GetTouchable test 275e0dac50fSopenharmony_ci * @tc.type: FUNC 276e0dac50fSopenharmony_ci */ 277e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetTouchable006, Function | SmallTest | Level2) 278e0dac50fSopenharmony_ci{ 279e0dac50fSopenharmony_ci WindowProperty winPropSrc; 280e0dac50fSopenharmony_ci bool isTouchable = true; 281e0dac50fSopenharmony_ci winPropSrc.SetTouchable(isTouchable); 282e0dac50fSopenharmony_ci bool res = winPropSrc.GetFocusable(); 283e0dac50fSopenharmony_ci ASSERT_EQ(res, isTouchable); 284e0dac50fSopenharmony_ci} 285e0dac50fSopenharmony_ci 286e0dac50fSopenharmony_ci/** 287e0dac50fSopenharmony_ci * @tc.name: GetCallingWindow007 288e0dac50fSopenharmony_ci * @tc.desc: GetCallingWindow test 289e0dac50fSopenharmony_ci * @tc.type: FUNC 290e0dac50fSopenharmony_ci */ 291e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetCallingWindow007, Function | SmallTest | Level2) 292e0dac50fSopenharmony_ci{ 293e0dac50fSopenharmony_ci WindowProperty winPropSrc; 294e0dac50fSopenharmony_ci uint32_t windowId = 1; 295e0dac50fSopenharmony_ci winPropSrc.SetCallingWindow(windowId); 296e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetCallingWindow(); 297e0dac50fSopenharmony_ci ASSERT_EQ(res, windowId); 298e0dac50fSopenharmony_ci} 299e0dac50fSopenharmony_ci 300e0dac50fSopenharmony_ci/** 301e0dac50fSopenharmony_ci * @tc.name: GetPrivacyMode008 302e0dac50fSopenharmony_ci * @tc.desc: GetPrivacyMode test 303e0dac50fSopenharmony_ci * @tc.type: FUNC 304e0dac50fSopenharmony_ci */ 305e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetPrivacyMode008, Function | SmallTest | Level2) 306e0dac50fSopenharmony_ci{ 307e0dac50fSopenharmony_ci WindowProperty winPropSrc; 308e0dac50fSopenharmony_ci bool isPrivate = true; 309e0dac50fSopenharmony_ci winPropSrc.SetPrivacyMode(isPrivate); 310e0dac50fSopenharmony_ci bool res = winPropSrc.GetPrivacyMode(); 311e0dac50fSopenharmony_ci ASSERT_EQ(res, isPrivate); 312e0dac50fSopenharmony_ci} 313e0dac50fSopenharmony_ci 314e0dac50fSopenharmony_ci/** 315e0dac50fSopenharmony_ci * @tc.name: GetSystemPrivacyMode009 316e0dac50fSopenharmony_ci * @tc.desc: GetSystemPrivacyMode test 317e0dac50fSopenharmony_ci * @tc.type: FUNC 318e0dac50fSopenharmony_ci */ 319e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetSystemPrivacyMode009, Function | SmallTest | Level2) 320e0dac50fSopenharmony_ci{ 321e0dac50fSopenharmony_ci WindowProperty winPropSrc; 322e0dac50fSopenharmony_ci bool isSystemPrivate = true; 323e0dac50fSopenharmony_ci winPropSrc.SetSystemPrivacyMode(isSystemPrivate); 324e0dac50fSopenharmony_ci bool res = winPropSrc.GetSystemPrivacyMode(); 325e0dac50fSopenharmony_ci ASSERT_EQ(res, isSystemPrivate); 326e0dac50fSopenharmony_ci} 327e0dac50fSopenharmony_ci 328e0dac50fSopenharmony_ci/** 329e0dac50fSopenharmony_ci * @tc.name: GetSnapshotSkip010 330e0dac50fSopenharmony_ci * @tc.desc: GetSnapshotSkip test 331e0dac50fSopenharmony_ci * @tc.type: FUNC 332e0dac50fSopenharmony_ci */ 333e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetSnapshotSkip010, Function | SmallTest | Level2) 334e0dac50fSopenharmony_ci{ 335e0dac50fSopenharmony_ci WindowProperty winPropSrc; 336e0dac50fSopenharmony_ci bool isSkip = true; 337e0dac50fSopenharmony_ci winPropSrc.SetSnapshotSkip(isSkip); 338e0dac50fSopenharmony_ci bool res = winPropSrc.GetSnapshotSkip(); 339e0dac50fSopenharmony_ci ASSERT_EQ(res, isSkip); 340e0dac50fSopenharmony_ci} 341e0dac50fSopenharmony_ci 342e0dac50fSopenharmony_ci/** 343e0dac50fSopenharmony_ci * @tc.name: GetAlpha011 344e0dac50fSopenharmony_ci * @tc.desc: GetAlpha test 345e0dac50fSopenharmony_ci * @tc.type: FUNC 346e0dac50fSopenharmony_ci */ 347e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetAlpha011, Function | SmallTest | Level2) 348e0dac50fSopenharmony_ci{ 349e0dac50fSopenharmony_ci WindowProperty winPropSrc; 350e0dac50fSopenharmony_ci float alpha = 1; 351e0dac50fSopenharmony_ci winPropSrc.SetAlpha(alpha); 352e0dac50fSopenharmony_ci float res = winPropSrc.GetAlpha(); 353e0dac50fSopenharmony_ci ASSERT_EQ(res, alpha); 354e0dac50fSopenharmony_ci} 355e0dac50fSopenharmony_ci 356e0dac50fSopenharmony_ci/** 357e0dac50fSopenharmony_ci * @tc.name: GetBrightness012 358e0dac50fSopenharmony_ci * @tc.desc: GetBrightness test 359e0dac50fSopenharmony_ci * @tc.type: FUNC 360e0dac50fSopenharmony_ci */ 361e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetBrightness012, Function | SmallTest | Level2) 362e0dac50fSopenharmony_ci{ 363e0dac50fSopenharmony_ci WindowProperty winPropSrc; 364e0dac50fSopenharmony_ci float brightness = 1; 365e0dac50fSopenharmony_ci winPropSrc.SetBrightness(brightness); 366e0dac50fSopenharmony_ci float res = winPropSrc.GetBrightness(); 367e0dac50fSopenharmony_ci ASSERT_EQ(res, brightness); 368e0dac50fSopenharmony_ci} 369e0dac50fSopenharmony_ci 370e0dac50fSopenharmony_ci/** 371e0dac50fSopenharmony_ci * @tc.name: IsTurnScreenOn013 372e0dac50fSopenharmony_ci * @tc.desc: IsTurnScreenOn test 373e0dac50fSopenharmony_ci * @tc.type: FUNC 374e0dac50fSopenharmony_ci */ 375e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, IsTurnScreenOn013, Function | SmallTest | Level2) 376e0dac50fSopenharmony_ci{ 377e0dac50fSopenharmony_ci WindowProperty winPropSrc; 378e0dac50fSopenharmony_ci bool turnScreenOn = true; 379e0dac50fSopenharmony_ci winPropSrc.SetTurnScreenOn(turnScreenOn); 380e0dac50fSopenharmony_ci bool res = winPropSrc.IsTurnScreenOn(); 381e0dac50fSopenharmony_ci ASSERT_EQ(res, turnScreenOn); 382e0dac50fSopenharmony_ci} 383e0dac50fSopenharmony_ci 384e0dac50fSopenharmony_ci/** 385e0dac50fSopenharmony_ci * @tc.name: IsKeepScreenOn014 386e0dac50fSopenharmony_ci * @tc.desc: IsKeepScreenOn test 387e0dac50fSopenharmony_ci * @tc.type: FUNC 388e0dac50fSopenharmony_ci */ 389e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, IsKeepScreenOn014, Function | SmallTest | Level2) 390e0dac50fSopenharmony_ci{ 391e0dac50fSopenharmony_ci WindowProperty winPropSrc; 392e0dac50fSopenharmony_ci bool keepScreenOn = true; 393e0dac50fSopenharmony_ci winPropSrc.SetKeepScreenOn(keepScreenOn); 394e0dac50fSopenharmony_ci bool res = winPropSrc.IsKeepScreenOn(); 395e0dac50fSopenharmony_ci ASSERT_EQ(res, keepScreenOn); 396e0dac50fSopenharmony_ci} 397e0dac50fSopenharmony_ci 398e0dac50fSopenharmony_ci/** 399e0dac50fSopenharmony_ci * @tc.name: GetWindowFlags015 400e0dac50fSopenharmony_ci * @tc.desc: GetWindowFlags test 401e0dac50fSopenharmony_ci * @tc.type: FUNC 402e0dac50fSopenharmony_ci */ 403e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetWindowFlags015, Function | SmallTest | Level2) 404e0dac50fSopenharmony_ci{ 405e0dac50fSopenharmony_ci WindowProperty winPropSrc; 406e0dac50fSopenharmony_ci uint32_t flags = 1; 407e0dac50fSopenharmony_ci winPropSrc.SetWindowFlags(flags); 408e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetWindowFlags(); 409e0dac50fSopenharmony_ci ASSERT_EQ(res, flags); 410e0dac50fSopenharmony_ci} 411e0dac50fSopenharmony_ci 412e0dac50fSopenharmony_ci/** 413e0dac50fSopenharmony_ci * @tc.name: GetSystemBarProperty016 414e0dac50fSopenharmony_ci * @tc.desc: GetSystemBarProperty test 415e0dac50fSopenharmony_ci * @tc.type: FUNC 416e0dac50fSopenharmony_ci */ 417e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetSystemBarProperty016, Function | SmallTest | Level2) 418e0dac50fSopenharmony_ci{ 419e0dac50fSopenharmony_ci WindowProperty winPropSrc; 420e0dac50fSopenharmony_ci SystemBarProperty property; 421e0dac50fSopenharmony_ci WindowType type = WindowType::WINDOW_TYPE_STATUS_BAR; 422e0dac50fSopenharmony_ci winPropSrc.SetSystemBarProperty(type, property); 423e0dac50fSopenharmony_ci std::unordered_map<WindowType, SystemBarProperty> res = winPropSrc.GetSystemBarProperty(); 424e0dac50fSopenharmony_ci ASSERT_EQ(res[type], property); 425e0dac50fSopenharmony_ci} 426e0dac50fSopenharmony_ci 427e0dac50fSopenharmony_ci/** 428e0dac50fSopenharmony_ci * @tc.name: GetStretchable017 429e0dac50fSopenharmony_ci * @tc.desc: GetHitOffset test 430e0dac50fSopenharmony_ci * @tc.type: FUNC 431e0dac50fSopenharmony_ci */ 432e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetStretchable017, Function | SmallTest | Level2) 433e0dac50fSopenharmony_ci{ 434e0dac50fSopenharmony_ci WindowProperty winPropSrc; 435e0dac50fSopenharmony_ci bool stretchable = true; 436e0dac50fSopenharmony_ci winPropSrc.SetStretchable(stretchable); 437e0dac50fSopenharmony_ci bool res = winPropSrc.GetStretchable(); 438e0dac50fSopenharmony_ci ASSERT_EQ(res, stretchable); 439e0dac50fSopenharmony_ci} 440e0dac50fSopenharmony_ci 441e0dac50fSopenharmony_ci/** 442e0dac50fSopenharmony_ci * @tc.name: GetAnimationFlag018 443e0dac50fSopenharmony_ci * @tc.desc: GetAnimationFlag test 444e0dac50fSopenharmony_ci * @tc.type: FUNC 445e0dac50fSopenharmony_ci */ 446e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetAnimationFlag018, Function | SmallTest | Level2) 447e0dac50fSopenharmony_ci{ 448e0dac50fSopenharmony_ci WindowProperty winPropSrc; 449e0dac50fSopenharmony_ci uint32_t animationFlag = 1; 450e0dac50fSopenharmony_ci winPropSrc.SetAnimationFlag(animationFlag); 451e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetAnimationFlag(); 452e0dac50fSopenharmony_ci ASSERT_EQ(res, animationFlag); 453e0dac50fSopenharmony_ci} 454e0dac50fSopenharmony_ci 455e0dac50fSopenharmony_ci/** 456e0dac50fSopenharmony_ci * @tc.name: GetModeSupportInfo019 457e0dac50fSopenharmony_ci * @tc.desc: GetModeSupportInfo test 458e0dac50fSopenharmony_ci * @tc.type: FUNC 459e0dac50fSopenharmony_ci */ 460e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetModeSupportInfo019, Function | SmallTest | Level2) 461e0dac50fSopenharmony_ci{ 462e0dac50fSopenharmony_ci WindowProperty winPropSrc; 463e0dac50fSopenharmony_ci uint32_t modeSupportInfo = 1; 464e0dac50fSopenharmony_ci winPropSrc.SetModeSupportInfo(modeSupportInfo); 465e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetModeSupportInfo(); 466e0dac50fSopenharmony_ci ASSERT_EQ(res, modeSupportInfo); 467e0dac50fSopenharmony_ci} 468e0dac50fSopenharmony_ci 469e0dac50fSopenharmony_ci/** 470e0dac50fSopenharmony_ci * @tc.name: GetRequestModeSupportInfo020 471e0dac50fSopenharmony_ci * @tc.desc: GetRequestModeSupportInfo test 472e0dac50fSopenharmony_ci * @tc.type: FUNC 473e0dac50fSopenharmony_ci */ 474e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetRequestModeSupportInfo020, Function | SmallTest | Level2) 475e0dac50fSopenharmony_ci{ 476e0dac50fSopenharmony_ci WindowProperty winPropSrc; 477e0dac50fSopenharmony_ci uint32_t requestModeSupportInfo = 1; 478e0dac50fSopenharmony_ci winPropSrc.SetRequestModeSupportInfo(requestModeSupportInfo); 479e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetRequestModeSupportInfo(); 480e0dac50fSopenharmony_ci ASSERT_EQ(res, requestModeSupportInfo); 481e0dac50fSopenharmony_ci} 482e0dac50fSopenharmony_ci 483e0dac50fSopenharmony_ci/** 484e0dac50fSopenharmony_ci * @tc.name: GetTokenState021 485e0dac50fSopenharmony_ci * @tc.desc: GetTokenState test 486e0dac50fSopenharmony_ci * @tc.type: FUNC 487e0dac50fSopenharmony_ci */ 488e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetTokenState021, Function | SmallTest | Level2) 489e0dac50fSopenharmony_ci{ 490e0dac50fSopenharmony_ci WindowProperty winPropSrc; 491e0dac50fSopenharmony_ci bool hasToken = true; 492e0dac50fSopenharmony_ci winPropSrc.SetTokenState(hasToken); 493e0dac50fSopenharmony_ci bool res = winPropSrc.GetTokenState(); 494e0dac50fSopenharmony_ci ASSERT_EQ(res, hasToken); 495e0dac50fSopenharmony_ci} 496e0dac50fSopenharmony_ci 497e0dac50fSopenharmony_ci/** 498e0dac50fSopenharmony_ci * @tc.name: GetDragType022 499e0dac50fSopenharmony_ci * @tc.desc: GetDragType test 500e0dac50fSopenharmony_ci * @tc.type: FUNC 501e0dac50fSopenharmony_ci */ 502e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetDragType022, Function | SmallTest | Level2) 503e0dac50fSopenharmony_ci{ 504e0dac50fSopenharmony_ci WindowProperty winPropSrc; 505e0dac50fSopenharmony_ci DragType dragType = DragType::DRAG_UNDEFINED; 506e0dac50fSopenharmony_ci winPropSrc.SetDragType(dragType); 507e0dac50fSopenharmony_ci DragType res = winPropSrc.GetDragType(); 508e0dac50fSopenharmony_ci ASSERT_EQ(res, dragType); 509e0dac50fSopenharmony_ci} 510e0dac50fSopenharmony_ci 511e0dac50fSopenharmony_ci/** 512e0dac50fSopenharmony_ci * @tc.name: GetOriginRect023 513e0dac50fSopenharmony_ci * @tc.desc: GetOriginRect test 514e0dac50fSopenharmony_ci * @tc.type: FUNC 515e0dac50fSopenharmony_ci */ 516e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetOriginRect023, Function | SmallTest | Level2) 517e0dac50fSopenharmony_ci{ 518e0dac50fSopenharmony_ci WindowProperty winPropSrc; 519e0dac50fSopenharmony_ci Rect rect = { 0, 0, 0, 0 }; 520e0dac50fSopenharmony_ci winPropSrc.SetOriginRect(rect); 521e0dac50fSopenharmony_ci Rect res = winPropSrc.GetOriginRect(); 522e0dac50fSopenharmony_ci ASSERT_EQ(res, rect); 523e0dac50fSopenharmony_ci} 524e0dac50fSopenharmony_ci 525e0dac50fSopenharmony_ci/** 526e0dac50fSopenharmony_ci * @tc.name: SetTouchHotAreas028 527e0dac50fSopenharmony_ci * @tc.desc: SetTouchHotAreas test 528e0dac50fSopenharmony_ci * @tc.type: FUNC 529e0dac50fSopenharmony_ci */ 530e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, SetTouchHotAreas028, Function | SmallTest | Level2) 531e0dac50fSopenharmony_ci{ 532e0dac50fSopenharmony_ci WindowProperty winPropSrc; 533e0dac50fSopenharmony_ci std::vector<Rect> rects; 534e0dac50fSopenharmony_ci winPropSrc.SetTouchHotAreas(rects); 535e0dac50fSopenharmony_ci winPropSrc.GetTouchHotAreas(rects); 536e0dac50fSopenharmony_ci ASSERT_EQ(rects, winPropSrc.touchHotAreas_); 537e0dac50fSopenharmony_ci} 538e0dac50fSopenharmony_ci 539e0dac50fSopenharmony_ci/** 540e0dac50fSopenharmony_ci * @tc.name: SetAspectRatio029 541e0dac50fSopenharmony_ci * @tc.desc: SetAspectRatio test 542e0dac50fSopenharmony_ci * @tc.type: FUNC 543e0dac50fSopenharmony_ci */ 544e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, SetAspectRatio029, Function | SmallTest | Level2) 545e0dac50fSopenharmony_ci{ 546e0dac50fSopenharmony_ci WindowProperty winPropSrc; 547e0dac50fSopenharmony_ci float ratio = 1; 548e0dac50fSopenharmony_ci winPropSrc.SetAspectRatio(ratio); 549e0dac50fSopenharmony_ci float res = winPropSrc.GetAspectRatio(); 550e0dac50fSopenharmony_ci ASSERT_EQ(res, ratio); 551e0dac50fSopenharmony_ci} 552e0dac50fSopenharmony_ci 553e0dac50fSopenharmony_ci/** 554e0dac50fSopenharmony_ci * @tc.name: SetMaximizeMode030 555e0dac50fSopenharmony_ci * @tc.desc: SetMaximizeMode test 556e0dac50fSopenharmony_ci * @tc.type: FUNC 557e0dac50fSopenharmony_ci */ 558e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, SetMaximizeMode030, Function | SmallTest | Level2) 559e0dac50fSopenharmony_ci{ 560e0dac50fSopenharmony_ci WindowProperty winPropSrc; 561e0dac50fSopenharmony_ci MaximizeMode maximizeMode = { MaximizeMode::MODE_RECOVER }; 562e0dac50fSopenharmony_ci winPropSrc.SetMaximizeMode(maximizeMode); 563e0dac50fSopenharmony_ci MaximizeMode res = winPropSrc.GetMaximizeMode(); 564e0dac50fSopenharmony_ci ASSERT_EQ(res, maximizeMode); 565e0dac50fSopenharmony_ci} 566e0dac50fSopenharmony_ci 567e0dac50fSopenharmony_ci/** 568e0dac50fSopenharmony_ci * @tc.name: GetAccessTokenId031 569e0dac50fSopenharmony_ci * @tc.desc: GetAccessTokenId test 570e0dac50fSopenharmony_ci * @tc.type: FUNC 571e0dac50fSopenharmony_ci */ 572e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetAccessTokenId031, Function | SmallTest | Level2) 573e0dac50fSopenharmony_ci{ 574e0dac50fSopenharmony_ci WindowProperty winPropSrc; 575e0dac50fSopenharmony_ci uint32_t accessTokenId = 1; 576e0dac50fSopenharmony_ci winPropSrc.SetAccessTokenId(accessTokenId); 577e0dac50fSopenharmony_ci uint32_t res = winPropSrc.GetAccessTokenId(); 578e0dac50fSopenharmony_ci ASSERT_EQ(res, accessTokenId); 579e0dac50fSopenharmony_ci} 580e0dac50fSopenharmony_ci 581e0dac50fSopenharmony_ci/** 582e0dac50fSopenharmony_ci * @tc.name: SetWindowGravity032 583e0dac50fSopenharmony_ci * @tc.desc: SetWindowGravity test 584e0dac50fSopenharmony_ci * @tc.type: FUNC 585e0dac50fSopenharmony_ci */ 586e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetAccessTokenId032, Function | SmallTest | Level2) 587e0dac50fSopenharmony_ci{ 588e0dac50fSopenharmony_ci WindowProperty winPropSrc; 589e0dac50fSopenharmony_ci WindowGravity gravity = WindowGravity::WINDOW_GRAVITY_FLOAT; 590e0dac50fSopenharmony_ci uint32_t percent = 1; 591e0dac50fSopenharmony_ci winPropSrc.SetWindowGravity(gravity, percent); 592e0dac50fSopenharmony_ci winPropSrc.GetWindowGravity(gravity, percent); 593e0dac50fSopenharmony_ci ASSERT_EQ(gravity, winPropSrc.windowGravity_); 594e0dac50fSopenharmony_ci ASSERT_EQ(percent, winPropSrc.windowGravitySizePercent_); 595e0dac50fSopenharmony_ci} 596e0dac50fSopenharmony_ci 597e0dac50fSopenharmony_ci/** 598e0dac50fSopenharmony_ci * @tc.name: Write033 599e0dac50fSopenharmony_ci * @tc.desc: Write test 600e0dac50fSopenharmony_ci * @tc.type: FUNC 601e0dac50fSopenharmony_ci */ 602e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, Write033, Function | SmallTest | Level2) 603e0dac50fSopenharmony_ci{ 604e0dac50fSopenharmony_ci WindowProperty winPropDst; 605e0dac50fSopenharmony_ci Parcel parcel; 606e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_PRIVACY_MODE)); 607e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_SYSTEM_PRIVACY_MODE)); 608e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_SNAPSHOT_SKIP)); 609e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_ASPECT_RATIO)); 610e0dac50fSopenharmony_ci ASSERT_EQ(true, winPropDst.Write(parcel, PropertyChangeAction::ACTION_UPDATE_MAXIMIZE_STATE)); 611e0dac50fSopenharmony_ci} 612e0dac50fSopenharmony_ci 613e0dac50fSopenharmony_ci/** 614e0dac50fSopenharmony_ci * @tc.name: Read034 615e0dac50fSopenharmony_ci * @tc.desc: Read test 616e0dac50fSopenharmony_ci * @tc.type: FUNC 617e0dac50fSopenharmony_ci */ 618e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, Read034, Function | SmallTest | Level2) 619e0dac50fSopenharmony_ci{ 620e0dac50fSopenharmony_ci WindowProperty winPropSrc; 621e0dac50fSopenharmony_ci winPropSrc.SetPrivacyMode(true); 622e0dac50fSopenharmony_ci winPropSrc.SetTransparent(true); 623e0dac50fSopenharmony_ci 624e0dac50fSopenharmony_ci Parcel parcel; 625e0dac50fSopenharmony_ci winPropSrc.Marshalling(parcel); 626e0dac50fSopenharmony_ci 627e0dac50fSopenharmony_ci WindowProperty winPropDst; 628e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_SNAPSHOT_SKIP); 629e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_ASPECT_RATIO); 630e0dac50fSopenharmony_ci winPropDst.Read(parcel, PropertyChangeAction::ACTION_UPDATE_MAXIMIZE_STATE); 631e0dac50fSopenharmony_ci 632e0dac50fSopenharmony_ci ASSERT_EQ(false, winPropDst.GetPrivacyMode()); 633e0dac50fSopenharmony_ci ASSERT_EQ(false, winPropDst.GetTransparent()); 634e0dac50fSopenharmony_ci} 635e0dac50fSopenharmony_ci 636e0dac50fSopenharmony_ci/** 637e0dac50fSopenharmony_ci * @tc.name: GetTextFieldPositionY035 638e0dac50fSopenharmony_ci * @tc.desc: GetTextFieldPositionY test 639e0dac50fSopenharmony_ci * @tc.type: FUNC 640e0dac50fSopenharmony_ci */ 641e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetTextFieldPositionY035, Function | SmallTest | Level2) 642e0dac50fSopenharmony_ci{ 643e0dac50fSopenharmony_ci WindowProperty winPropSrc; 644e0dac50fSopenharmony_ci double textFieldPositionY = 1; 645e0dac50fSopenharmony_ci winPropSrc.SetTextFieldPositionY(textFieldPositionY); 646e0dac50fSopenharmony_ci double res = winPropSrc.GetTextFieldPositionY(); 647e0dac50fSopenharmony_ci ASSERT_EQ(res, textFieldPositionY); 648e0dac50fSopenharmony_ci} 649e0dac50fSopenharmony_ci 650e0dac50fSopenharmony_ci/** 651e0dac50fSopenharmony_ci * @tc.name: GetTextFieldHeight036 652e0dac50fSopenharmony_ci * @tc.desc: GetTextFieldHeight test 653e0dac50fSopenharmony_ci * @tc.type: FUNC 654e0dac50fSopenharmony_ci */ 655e0dac50fSopenharmony_ciHWTEST_F(WindowPropertyTest, GetTextFieldHeight36, Function | SmallTest | Level2) 656e0dac50fSopenharmony_ci{ 657e0dac50fSopenharmony_ci WindowProperty winPropSrc; 658e0dac50fSopenharmony_ci double textFieldHeight = 1; 659e0dac50fSopenharmony_ci winPropSrc.SetTextFieldHeight(textFieldHeight); 660e0dac50fSopenharmony_ci double res = winPropSrc.GetTextFieldHeight(); 661e0dac50fSopenharmony_ci ASSERT_EQ(res, textFieldHeight); 662e0dac50fSopenharmony_ci} 663e0dac50fSopenharmony_ci} 664e0dac50fSopenharmony_ci} // namespace Rosen 665e0dac50fSopenharmony_ci} // namespace OHOS