提交 36d5d741 编写于 作者: M Mupceet

fix gesture case

Signed-off-by: NMupceet <laiguizhong@huawei.com>
上级 6755388a
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
*/ */
import commonEvent from '@ohos.commonEvent'; import commonEvent from '@ohos.commonEvent';
import display from '@ohos.display' import display from '@ohos.display'
import accessibility from '@ohos.accessibility' import { GesturePath } from '@ohos.accessibility.GesturePath';
import { GesturePoint } from '@ohos.accessibility.GesturePoint';
export class ExtensionContextTest { export class ExtensionContextTest {
private context = undefined; private context = undefined;
...@@ -52,14 +53,10 @@ export class ExtensionContextTest { ...@@ -52,14 +53,10 @@ export class ExtensionContextTest {
private async processCase(caseName) { private async processCase(caseName) {
console.info('ExtensionContextTest processCase: ' + caseName); console.info('ExtensionContextTest processCase: ' + caseName);
let eventType: Array<string> = [];
let bundleName: Array<string> = []; let bundleName: Array<string> = [];
let windowId = -1; let windowId = -1;
let displayId = -1; let displayId = -1;
let gesturePath = {}; let gesturePath;
let gesturePos1 = {};
let gesturePos2 = {};
let gesturePos3 = {};
switch (caseName) { switch (caseName) {
case 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500': case 'AccessibilityExtensionContextTest_setTargetBundleName_asyncCallback_1500':
...@@ -179,26 +176,26 @@ export class ExtensionContextTest { ...@@ -179,26 +176,26 @@ export class ExtensionContextTest {
this.getFocusElementByTypePromise(caseName, false, false); this.getFocusElementByTypePromise(caseName, false, false);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4500': case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4500':
gesturePos1 = {positionX: 10, positionY: 10}; gesturePath = new GesturePath(100);
gesturePath = {points: [gesturePos1], durationTime: 100}; gesturePath.points.push(new GesturePoint(10, 10));
this.gestureInjectCallback(caseName, gesturePath); this.gestureInjectCallback(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4600': case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4600':
gesturePos1 = {positionX: 50, positionY: 50}; gesturePath = new GesturePath(60000);
gesturePath = {points: [gesturePos1], durationTime: 60000}; gesturePath.points.push(new GesturePoint(50, 50));
this.gestureInjectCallback(caseName, gesturePath); this.gestureInjectCallback(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4700': case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4700':
gesturePos1 = {positionX: 200, positionY: 200}; gesturePath = new GesturePath(1000);
gesturePos2 = {positionX: 100, positionY: 100}; gesturePath.points.push(new GesturePoint(200, 200),
gesturePath = {points: [gesturePos1, gesturePos2], durationTime: 1000}; new GesturePoint(100, 100));
this.gestureInjectCallback(caseName, gesturePath); this.gestureInjectCallback(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4800': case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4800':
gesturePos1 = {positionX: 50, positionY: 50}; gesturePath = new GesturePath(60000);
gesturePos2 = {positionX: 100, positionY: 100}; gesturePath.points.push(new GesturePoint(50, 50),
gesturePos3 = {positionX: 1000, positionY: 1000}; new GesturePoint(100, 100),
gesturePath = {points: [gesturePos1, gesturePos2, gesturePos3], durationTime: 60000}; new GesturePoint(1000, 1000));
this.gestureInjectCallback(caseName, gesturePath); this.gestureInjectCallback(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900': case 'AccessibilityExtensionContextTest_gestureInject_asyncCallback_4900':
...@@ -206,26 +203,26 @@ export class ExtensionContextTest { ...@@ -206,26 +203,26 @@ export class ExtensionContextTest {
this.gestureInjectCallback(caseName, gesturePath); this.gestureInjectCallback(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5000': case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5000':
gesturePos1 = {positionX: 10, positionY: 10}; gesturePath = new GesturePath(100);
gesturePath = {points: [gesturePos1], durationTime: 100}; gesturePath.points.push(new GesturePoint(10, 10));
this.gestureInjectPromise(caseName, gesturePath); this.gestureInjectPromise(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5100': case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5100':
gesturePos1 = {positionX: 50, positionY: 50}; gesturePath = new GesturePath(60000);
gesturePath = {points: [gesturePos1], durationTime: 60000}; gesturePath.points.push(new GesturePoint(50, 50));
this.gestureInjectPromise(caseName, gesturePath); this.gestureInjectPromise(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5200': case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5200':
gesturePos1 = {positionX: 200, positionY: 200}; gesturePath = new GesturePath(1000);
gesturePos2 = {positionX: 100, positionY: 100}; gesturePath.points.push(new GesturePoint(200, 200),
gesturePath = {points: [gesturePos1, gesturePos2], durationTime: 1000}; new GesturePoint(100, 100));
this.gestureInjectPromise(caseName, gesturePath); this.gestureInjectPromise(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5300': case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5300':
gesturePos1 = {positionX: 50, positionY: 50}; gesturePath = new GesturePath(60000);
gesturePos2 = {positionX: 100, positionY: 100}; gesturePath.points.push(new GesturePoint(50, 50),
gesturePos3 = {positionX: 1000, positionY: 1000}; new GesturePoint(100, 100),
gesturePath = {points: [gesturePos1, gesturePos2, gesturePos3], durationTime: 60000}; new GesturePoint(1000, 1000));
this.gestureInjectPromise(caseName, gesturePath); this.gestureInjectPromise(caseName, gesturePath);
break; break;
case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400': case 'AccessibilityExtensionContextTest_gestureInject_asyncPromise_5400':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册