fix dialog tdd test crash problem

Signed-off-by: wuhy_irobot2013 <wuhuayang@huawei.com>
Change-Id: I204e3909acaa4d353a28879517081972a6deeb00
This commit is contained in:
wuhy_irobot2013
2021-08-30 17:01:36 +08:00
parent 255ba95d35
commit a2df010de6
2 changed files with 4 additions and 2 deletions
@@ -323,7 +323,7 @@ void DialogTddTest::DialogTest002()
}
// step2: set dialog window id and click
const int16_t positionX1 = 414;
const int16_t positionX1 = 460;
const int16_t positionY1 = 274;
Window *window = RootView::GetInstance()->GetBoundWindow();
EventInjector::GetInstance()->SetWindowId(window->GetWindowId() + 1);
@@ -342,7 +342,7 @@ void DialogTddTest::DialogTest002()
}
// step5: set dialog window id and click
const int16_t positionX2 = 469;
const int16_t positionX2 = 500;
const int16_t positionY2 = 274;
EventInjector::GetInstance()->SetWindowId(window->GetWindowId() + 1);
Click(positionX2, positionY2);
@@ -25,6 +25,7 @@
#include "event_injector.h"
#include "js_app_context.h"
#include "js_app_environment.h"
#include "module_manager.h"
#include "root_view.h"
namespace OHOS {
@@ -97,6 +98,7 @@ void BasicTddTest::SetUp()
void BasicTddTest::TearDown()
{
ModuleManager::GetInstance()->CleanUpModule();
JsAppEnvironment::GetInstance()->Cleanup();
EventInjector *injector = EventInjector::GetInstance();