add UIExtensionSamples

Signed-off-by: tantingting <tantingting5@huawei.com>
This commit is contained in:
tantingting 2024-08-16 16:33:31 +08:00
parent c5c911f2d7
commit f4f524c3b5
9 changed files with 75 additions and 107 deletions

View File

@ -1020,6 +1020,15 @@ Note:If the text contains special characters, please escape them according to th
<filteritem type="filepath" name="code/BasicFeature/Ability/AbilityRuntime/entry/src/main/resources/base/media/ic_arrow.svg" desc="Provided by code/BasicFeature/Ability/AbilityRuntime"/>
<filteritem type="filepath" name="code/BasicFeature/Ability/AbilityRuntime/AppScope/resources/base/media/app_icon.png" desc="Provided by code/BasicFeature/Ability/AbilityRuntime"/>
<filteritem type="filepath" name="code/BasicFeature/Ability/AbilityRuntime/entry/src/main/resources/rawfile/font/Roboto-Regular.ttf" desc="Provided by code/BasicFeature/Ability/AbilityRuntime"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/screenshots/app_status.jpeg" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/screenshots/index.jpeg" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/screenshots/sync_data.jpeg" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/screenshots/uiextension.jpeg" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/entry/src/main/resources/base/media/background.png" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/entry/src/main/resources/base/media/foreground.png" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/entry/src/main/resources/base/media/startIcon.png" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/entry/src/main/resources/base/media/ic_arrow.svg" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/SystemFeature/UIExtensionSamples/AppScope/resources/base/media/app_icon.png" desc="Provided by code/SystemFeature/UIExtensionSamples"/>
<filteritem type="filepath" name="code/BasicFeature/Print/ScanNapiInterfaceDemo/entry/src/main/resources/base/media/startIcon.png" desc="Provided by code/BasicFeature/Print/ScanNapiInterfaceDemo"/>
<filteritem type="filepath" name="code/BasicFeature/Print/ScanNapiInterfaceDemo/entry/src/main/resources/base/media/background.png" desc="Provided by code/BasicFeature/Print/ScanNapiInterfaceDemo"/>
<filteritem type="filepath" name="code/BasicFeature/Print/ScanNapiInterfaceDemo/AppScope/resources/base/media/app_icon.png" desc="Provided by code/BasicFeature/Print/ScanNapiInterfaceDemo"/>

View File

@ -16,7 +16,7 @@ AbilityStartCallback对应接口
1.点击主页面**AbilityStartCallback开发示例**按钮,跳转到'AbilityStartCallback开发示例'界面;
2.点击**startAbilityByTyp onResult**按钮,拉起'所有照片'窗口,点击返回按钮,返回上级界面并弹出'startAbilityByType onResult...'信息
2.点击**startAbilityByTyp onResult**按钮,拉起'所有照片'窗口,点击返回按钮,返回上级界面;
3.点击**startAbilityByType onError**按钮,弹出提示'startAbilityByType onError...'信息。
@ -24,21 +24,21 @@ AbilityStartCallback对应接口
UIExtensionContext对应接口
1.点击主页面**UIExtensionAbility开发示例**按钮,跳转到'UIExtensionAbility开发示例'界面;
1.点击主页面**UIExtensionContext开发示例**按钮,跳转到'UIExtensionContext开发示例'界面;
2.点击**openLink**按钮启动一个新的UIAbility点击返回按钮返回上级界面;
3.点击**启动UIExtensionAbility**按钮启动一个新的UIExtensionAbility在UIExtensionAbility界面上显示reportDrawnCompletedterminateSelf(callback)terminateSelf(promise)terminateSelfWithResult(callback)terminateSelfWithResult(promise)接口对应的按钮;
4.点击**reportDrawnCompleted**按钮,弹出提示'startAbilityByType onError...'信息;
4.点击**reportDrawnCompleted**按钮,弹出提示'UIExtensionContent.reportDrawnCompleted succeed.'信息;
5.点击**terminateSelf callback**按钮关闭UIExtensionAbility显示'UIExtensionAbility开发示例'界面;
5.点击**terminateSelf callback**按钮关闭UIExtensionAbility显示'UIExtensionContext开发示例'界面;
6.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelf promise**按钮关闭UIExtensionAbility显示'UIExtensionAbility开发示例'界面;
6.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelf promise**按钮关闭UIExtensionAbility显示'UIExtensionContext开发示例'界面;
7.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelfWithResult callback**按钮关闭UIExtensionAbility显 示'UIExtensionAbility开发示 例'界面;
7.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelfWithResult callback**按钮关闭UIExtensionAbility显 示'UIExtensionContext开发示例'界面;
8.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelfWithResult promise**按钮关闭UIExtensionAbility显示'UIExtensionAbility开发示例'界面。
8.点击**启动UIExtensionAbility**按钮在UIExtensionAbility界面上点击**terminateSelfWithResult promise**按钮关闭UIExtensionAbility显示'UIExtensionContext开发示例'界面。
@ -48,15 +48,15 @@ UIExtensionContentSession对应接口
2.点击**启动UIExtensionAbility**按钮启动一个新的UIExtensionAbility在UIExtensionAbility界面上显示terminateSelfWithResult(callback)terminateSelfWithResult(promise)setWindowPrivacyMode(callback)setWindowPrivacyMode(promise)getUIExtensionWindowProxy接口对应的按钮
3.点击**terminateSelfWithResult callback**按钮关闭UIExtensionAbility显示'UIExtensionAbility开发示例'界面;
3.点击**terminateSelfWithResult callback**按钮关闭UIExtensionAbility显示'UIExtensionContentSession开发示例'界面;
4.点击**terminateSelfWithResult promise**按钮关闭UIExtensionAbility显示'UIExtensionAbility开发示例'界面;
4.点击**terminateSelfWithResult promise**按钮关闭UIExtensionAbility显示'UIExtensionContentSession开发示例'界面;
5.点击**setWindowPrivacyMode callback**按钮,弹出提示'startAbilityByType onError...'信息;
5.点击**setWindowPrivacyMode callback**按钮,弹出提示'UIExtensionContentSession.setWindowPrivacyMode(callback)...'信息;
6.点击**setWindowPrivacyMode promise**按钮,弹出提示'startAbilityByType onError...'信息;
6.点击**setWindowPrivacyMode promise**按钮,弹出提示'UIExtensionContentSession.setWindowPrivacyMode(promise)...'信息;
7.点击**getUIExtensionWindowProxy**按钮,弹出提示'startAbilityByType onError...'信息;
7.点击**getUIExtensionWindowProxy**按钮,弹出提示'UIExtensionContentSession.getUIExtensionWindowProxy...'信息;
### 工程目录

View File

@ -42,13 +42,8 @@ struct AbilityStartCallback {
})
}
}
.margin({
top: '7.18%',
bottom: '6.41%',
left: '3.33%'
})
.width('100%')
.height('7.18%')
.height('14.36%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.backGrounding'))
@ -85,7 +80,7 @@ struct AbilityStartCallback {
promptAction.showToast({ message: msg, duration: this.promptDuration, bottom: '11%' });
},
onResult: (abilityResult: common.AbilityResult) => {
console.log(`resultCode:` + abilityResult.resultCode + `bundleName:` +
hilog.info(DOMAIN, TAG, `resultCode:` + abilityResult.resultCode + `bundleName:` +
abilityResult.want?.bundleName);
let msg = `startAbilityByType onResult,
resultCode:${abilityResult.resultCode} bundleName:${abilityResult.want?.bundleName}`;
@ -131,7 +126,7 @@ struct AbilityStartCallback {
promptAction.showToast({ message: msg, duration: this.promptDuration, bottom: '11%' });
},
onResult: (abilityResult: common.AbilityResult) => {
console.log(`resultCode:` + abilityResult.resultCode + `bundleName:` +
hilog.info(DOMAIN, TAG, `resultCode:` + abilityResult.resultCode + `bundleName:` +
abilityResult.want?.bundleName);
let msg = `startAbilityByType onResult,
resultCode:${abilityResult.resultCode} bundleName:${abilityResult.want?.bundleName}`;
@ -140,7 +135,7 @@ struct AbilityStartCallback {
}
};
this.context.startAbilityByType('navigation', wantParam, abilityStartCallback, (err: BusinessError) => {
this.context.startAbilityByType('error', wantParam, abilityStartCallback, (err: BusinessError) => {
let msg = `startAbilityByType fail, err: ${JSON.stringify(err)}`;
hilog.info(DOMAIN, TAG, msg);
promptAction.showToast({ message: msg, duration: this.promptDuration, bottom: '11%' });
@ -152,7 +147,7 @@ struct AbilityStartCallback {
.borderRadius(24)
.margin({ top: 12, right: 12, left: 12 })
}
.height('85%')
.height('86%')
.backgroundColor($r('app.color.backGrounding'))
}
.height('100%')

View File

@ -42,13 +42,8 @@ struct UIExtensionContentSession {
})
}
}
.margin({
top: '7.18%',
bottom: '6.41%',
left: '3.33%'
})
.width('100%')
.height('11.28%')
.height('14.36%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.backGrounding'))
@ -109,7 +104,7 @@ struct UIExtensionContentSession {
.margin({ top: 12, right: 12, left: 12 })
}
.height('81%')
.height('86%')
.backgroundColor($r('app.color.backGrounding'))
}
.height('100%')

View File

@ -22,7 +22,7 @@ const TAG: string = 'UIExtensionContentSession';
const DOMAIN: number = 0xFF00;
let storage: LocalStorage = LocalStorage.getShared();
@Entry(storage)
@Entry
@Component
struct UIExtensionContentSessionPage {
private session: (UIExtensionContentSession | undefined) = storage.get<UIExtensionContentSession>('session');
@ -31,13 +31,6 @@ struct UIExtensionContentSessionPage {
build() {
Column() {
Row() {
}
.width('100%')
.height('6%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.start_window_background'))
Row() {
Flex({ justifyContent: FlexAlign.Start, alignContent: FlexAlign.Center }) {
Text($r('app.string.UIExtensionAbilityContext'))
@ -45,19 +38,13 @@ struct UIExtensionContentSessionPage {
.fontWeight(700)
.textAlign(TextAlign.Start)
.margin({
top: 8,
bottom: 8,
left: 12
top: '12%',
left: '2%'
})
}
}
.margin({
top: '7.18%',
bottom: '6.41%',
left: '3.33%'
})
.width('100%')
.height('7.18%')
.height('18%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.backGrounding'))
@ -216,7 +203,7 @@ struct UIExtensionContentSessionPage {
.margin({ top: 12, right: 12, left: 12 })
}
.height('85%')
.height('86%')
.backgroundColor($r('app.color.backGrounding'))
}
.height('100%')

View File

@ -43,13 +43,8 @@ struct UIExtensionContext {
})
}
}
.margin({
top: '7.18%',
bottom: '6.41%',
left: '3.33%'
})
.width('100%')
.height('7.18%')
.height('14.36%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.backGrounding'))
@ -164,7 +159,7 @@ struct UIExtensionContext {
.margin({ top: 12, right: 12, left: 12 })
}
.height('85%')
.height('86%')
.backgroundColor($r('app.color.backGrounding'))
}
.width('100%')

View File

@ -21,7 +21,7 @@ const TAG: string = 'UIExtensionContent';
const DOMAIN: number = 0xFF00;
let storage: LocalStorage = LocalStorage.getShared();
@Entry(storage)
@Entry
@Component
struct UIExtensionContextPage {
private context = getContext(this) as common.UIExtensionContext;
@ -30,13 +30,6 @@ struct UIExtensionContextPage {
build() {
Column() {
Row() {
}
.width('100%')
.height('6%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.start_window_background'))
Row() {
Flex({ justifyContent: FlexAlign.Start, alignContent: FlexAlign.Center }) {
Text($r('app.string.UIExtensionAbilityContext'))
@ -44,19 +37,13 @@ struct UIExtensionContextPage {
.fontWeight(700)
.textAlign(TextAlign.Start)
.margin({
top: 8,
bottom: 8,
left: 12
top: '12%',
left: '2%'
})
}
}
.margin({
top: '7.18%',
bottom: '6.41%',
left: '3.33%'
})
.width('100%')
.height('7.18%')
.height('18%')
.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.backGrounding'))
@ -225,7 +212,7 @@ struct UIExtensionContextPage {
.margin({ top: 12, right: 12, left: 12 })
}
.height('85%')
.height('86%')
.backgroundColor($r('app.color.backGrounding'))
}
.height('100%')

View File

@ -17,9 +17,9 @@ import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import { describe, it, expect, beforeAll } from '@ohos/hypium';
const TAG = '[Sample_PublicAbility]';
const TAG = '[Sample_UIExtensionSamples]';
const DOMAIN = 0xF811;
const BUNDLE = 'PublicAbility_';
const BUNDLE = 'UIExtensionSamples_';
const TIME = 1500;
export default function abilityTest() {
@ -40,15 +40,15 @@ export default function abilityTest() {
})
/**
* @tc.number : PublicAbility_AbilityStartCallback_001
* @tc.name : PublicAbility_AbilityStartCallback_001
* @tc.number : UIExtensionSamples_AbilityStartCallback_001
* @tc.name : UIExtensionSamples_AbilityStartCallback_001
* @tc.desc : Test the interface in AbilityStartCallback
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('PublicAbility_AbilityStartCallback_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_AbilityStartCallback_001 begin');
it('UIExtensionSamples_AbilityStartCallback_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_AbilityStartCallback_001 begin');
let driver = await Driver.create();
await driver.delayMs(TIME);
@ -70,7 +70,7 @@ export default function abilityTest() {
await onError.click();
await driver.delayMs(TIME);
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_AbilityStartCallback_001 end');
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_AbilityStartCallback_001 end');
await driver.delayMs(TIME);
await driver.pressBack();
await driver.delayMs(TIME);
@ -78,15 +78,15 @@ export default function abilityTest() {
})
/**
* @tc.number : PublicAbility_UIAbilityContext_001
* @tc.name : PublicAbility_UIAbilityContext_001
* @tc.number : UIExtensionSamples_UIAbilityContext_001
* @tc.name : UIExtensionSamples_UIAbilityContext_001
* @tc.desc : Test the interface in UIAbilityContext
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('PublicAbility_UIAbilityContext_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIAbilityContext_001 begin');
it('UIExtensionSamples_UIAbilityContext_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIAbilityContext_001 begin');
let driver = await Driver.create();
await driver.delayMs(TIME);
@ -122,20 +122,20 @@ export default function abilityTest() {
await startUIExtensionSecond.click();
await driver.delayMs(TIME);
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIAbilityContext_001 end');
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIAbilityContext_001 end');
done()
})
/**
* @tc.number : PublicAbility_UIAbilityContext_002
* @tc.name : PublicAbility_UIAbilityContext_002
* @tc.number : UIExtensionSamples_UIAbilityContext_002
* @tc.name : UIExtensionSamples_UIAbilityContext_002
* @tc.desc : Test the interface in UIAbilityContext
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('PublicAbility_UIAbilityContext_002', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIAbilityContext_002 begin');
it('UIExtensionSamples_UIAbilityContext_002', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIAbilityContext_002 begin');
let driver = await Driver.create();
await driver.delayMs(TIME);
@ -164,7 +164,7 @@ export default function abilityTest() {
await terminateSelfWithResultPromise.click();
await driver.delayMs(TIME);
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIAbilityContext_002 end');
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIAbilityContext_002 end');
await driver.delayMs(TIME);
await driver.pressBack();
await driver.delayMs(TIME);
@ -172,15 +172,15 @@ export default function abilityTest() {
})
/**
* @tc.number : PublicAbility_UIExtensionContentSession_001
* @tc.name : PublicAbility_UIExtensionContentSession_001
* @tc.number : UIExtensionSamples_UIExtensionContentSession_001
* @tc.name : UIExtensionSamples_UIExtensionContentSession_001
* @tc.desc : Test the interface in UIExtensionContentSession
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('PublicAbility_UIExtensionContentSession_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIExtensionContentSession_001 begin');
it('UIExtensionSamples_UIExtensionContentSession_001', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIExtensionContentSession_001 begin');
let driver = await Driver.create();
await driver.delayMs(TIME);
@ -204,20 +204,20 @@ export default function abilityTest() {
await startUIExtensionSecond.click();
await driver.delayMs(TIME);
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIExtensionContentSession_001 end');
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIExtensionContentSession_001 end');
done()
})
/**
* @tc.number : PublicAbility_UIExtensionContentSession_002
* @tc.name : PublicAbility_UIExtensionContentSession_002
* @tc.number : UIExtensionSamples_UIExtensionContentSession_002
* @tc.name : UIExtensionSamples_UIExtensionContentSession_002
* @tc.desc : Test the interface in UIExtensionContentSession
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 1
*/
it('PublicAbility_UIExtensionContentSession_002', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIExtensionContentSession_002 begin');
it('UIExtensionSamples_UIExtensionContentSession_002', 0, async (done: Function) => {
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIExtensionContentSession_002 begin');
let driver = await Driver.create();
await driver.delayMs(TIME);
@ -246,7 +246,7 @@ export default function abilityTest() {
await getUIExtensionWindowProxy.click();
await driver.delayMs(TIME);
hilog.info(DOMAIN, TAG, BUNDLE + 'PublicAbility_UIExtensionContentSession_002 end');
hilog.info(DOMAIN, TAG, BUNDLE + 'UIExtensionSamples_UIExtensionContentSession_002 end');
await driver.delayMs(TIME);
await driver.pressBack();
await driver.delayMs(TIME);

View File

@ -1,9 +1,9 @@
|测试功能|预置条件|输入|预期输出|测试结果|
|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|
|拉起应用| 设备正常运行| |成功拉起应用|Pass|
|测试AbilityStartCallback中接口| AbilityStartCallback开发示例页面 | 1.点击startAbilityByType(onResult)按钮,拉起新界面,点击返回按钮<br/>2.点击startAbilityByType(onError)按钮 | 1.拉起新界面<br/>2.弹出Toast信息 |Pass|
|测试UIAbilityContext中接口| 位于UIAbilityContext开发示例页面 | 1.点击openLink按钮<br/>2.点击返回按钮返回UIExtensionContext开发示例界面点击启动UIExtensionAbility按钮<br/>3.点击reportDrawnCompleted按钮<br/>4.点击terminateSelfcallback按钮<br/>5.点击启动UIExtensionAbility按钮 | 1.拉起新的Ability<br/>2.进入UIExtensionAbility界面<br/>3.弹出Toast信息<br/>4.UIExtensionAbility界面消失<br/>5.进入UIExtensionAbility界面 |Pass|
|测试UIAbilityContext中接口| 位于UIAbilityContext开发示例页面 | 1.点击terminateSelfpromise按钮<br/>2.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultpromise按钮<br/>3.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultcallback按钮 | 1.UIExtensionAbility界面消失<br/>2.UIExtensionAbility界面消失<br/>3.UIExtensionAbility界面消失 |Pass|
|测试UIExtensionContentSession中接口| 位于UIExtensionContentSession开发示例页面 | 1.点击启动UIExtensionAbility按钮<br/>2.点击terminateSelfWithResultpromise按钮<br/>3.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultcallback按钮<br/>4.点击启动UIExtensionAbility按钮 | 1.进入UIExtensionAbility界面<br/>2.UIExtensionAbility界面消失<br/>3.UIExtensionAbility界面消失<br/>4.进入UIExtensionAbility界面 |Pass|
|测试UIExtensionContentSession中接口| 位于UIExtensionContentSession开发示例页面 | 1.点击setWindowPrivacyModecallback按钮<br/>2.点击setWindowPrivacyModepromise按钮<br/>3.点击getUIExtensionWindowProxy按钮 | 1.弹出Toast信息<br/>2.弹出Toast信息<br/>3.弹出Toast信息 |Pass|
|测试功能|预置条件|输入|预期输出|是否手动|测试结果|
|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|--------------------------------|
|拉起应用| 设备正常运行| |成功拉起应用|否|Pass|
|测试AbilityStartCallback中接口| AbilityStartCallback开发示例页面 | 1.点击startAbilityByType(onResult)按钮,拉起新界面,点击返回按钮<br/>2.点击startAbilityByType(onError)按钮 | 1.拉起新界面<br/>2.弹出Toast信息 | 否 |Pass|
|测试UIAbilityContext中接口| 位于UIAbilityContext开发示例页面 | 1.点击openLink按钮<br/>2.点击返回按钮返回UIExtensionContext开发示例界面点击启动UIExtensionAbility按钮<br/>3.点击reportDrawnCompleted按钮<br/>4.点击terminateSelfcallback按钮<br/>5.点击启动UIExtensionAbility按钮 | 1.拉起新的Ability<br/>2.进入UIExtensionAbility界面<br/>3.弹出Toast信息<br/>4.UIExtensionAbility界面消失<br/>5.进入UIExtensionAbility界面 | 否 |Pass|
|测试UIAbilityContext中接口| 位于UIAbilityContext开发示例页面 | 1.点击terminateSelfpromise按钮<br/>2.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultpromise按钮<br/>3.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultcallback按钮 | 1.UIExtensionAbility界面消失<br/>2.UIExtensionAbility界面消失<br/>3.UIExtensionAbility界面消失 | 否 |Pass|
|测试UIExtensionContentSession中接口| 位于UIExtensionContentSession开发示例页面 | 1.点击启动UIExtensionAbility按钮<br/>2.点击terminateSelfWithResultpromise按钮<br/>3.点击启动UIExtensionAbility按钮进入UIExtensionAbility界面点击terminateSelfWithResultcallback按钮<br/>4.点击启动UIExtensionAbility按钮 | 1.进入UIExtensionAbility界面<br/>2.UIExtensionAbility界面消失<br/>3.UIExtensionAbility界面消失<br/>4.进入UIExtensionAbility界面 | 否 |Pass|
|测试UIExtensionContentSession中接口| 位于UIExtensionContentSession开发示例页面 | 1.点击setWindowPrivacyModecallback按钮<br/>2.点击setWindowPrivacyModepromise按钮<br/>3.点击getUIExtensionWindowProxy按钮 | 1.弹出Toast信息<br/>2.弹出Toast信息<br/>3.弹出Toast信息 | 否 |Pass|