Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0fcf6be4
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0fcf6be4
编写于
12月 26, 2022
作者:
O
openharmony_ci
提交者:
Gitee
12月 26, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6948 删除废弃的API9接口
Merge pull request !6948 from yangzk/master
上级
f292e2c8
d4e433c5
变更
26
显示空白变更内容
内联
并排
Showing
26 changed file
with
91 addition
and
206 deletion
+91
-206
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts
...overhaptest/entry/src/main/ets/FormAbility/FormAbility.ts
+7
-7
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...ptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+1
-1
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
...rhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
+20
-76
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets
...erhaptest/entry/src/main/ets/test/WantAgentCover.test.ets
+1
-1
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets
...rmsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets
+20
-13
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts
...formsinfo/module1/src/main/ets/FormAbility/FormAbility.ts
+7
-7
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts
...formsinfo/module2/src/main/ets/FormAbility/FormAbility.ts
+7
-7
ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets
...ntry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets
+1
-1
ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets
...agetest/entry/src/main/ets/test/StartAbilityForResult.ets
+1
-1
ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts
...tystagetest/entry/src/main/ets/FormAbility/FormAbility.ts
+7
-7
ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets
...itystagetest/entry/src/main/ets/test/StartAbilityTest.ets
+1
-1
ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
...entry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
+3
-3
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts
...erstagetest/entry/src/main/ets/FormAbility/FormAbility.ts
+1
-1
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts
...tagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts
+1
-1
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts
...tagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts
+1
-1
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
...edemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
+1
-1
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
...tagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
+1
-1
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
...edemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts
...eStagetest/entry/src/main/ets/Application/AbilityStage.ts
+1
-1
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts
...reStagetest/entry/src/main/ets/MainAbility/MainAbility.ts
+3
-3
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts
...reStagetest/entry/src/main/ets/TestAbility/TestAbility.ts
+1
-1
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js
...entTest/src/main/js/test/ActsNotificationWantAgentTest.js
+0
-66
request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts
...st_Stage/entry/src/main/ets/Application/MyAbilityStage.ts
+1
-1
request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts
...tTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts
+1
-1
wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts
...wukongtest/entry/src/main/ets/Application/AbilityStage.ts
+1
-1
wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts
...swukongtest/entry/src/main/ets/MainAbility/MainAbility.ts
+1
-1
未找到文件。
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,13 +13,13 @@
* limitations under the License.
*/
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
import
commonEvent
from
'
@ohos.commonEvent
'
;
export
default
class
FormAbility
extends
FormExtension
{
on
Create
(
want
)
{
on
AddForm
(
want
)
{
// Called to return a FormBindingData object.
console
.
info
(
"
FormAbility onCreate
"
)
let
formData
=
{
...
...
@@ -40,24 +40,24 @@ export default class FormAbility extends FormExtension {
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
onCastToNormal
Form
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
onUpdate
Form
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
on
VisibilityChange
(
newStatus
)
{
on
ChangeFormVisibility
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
on
Form
Event
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
on
Destroy
(
formId
)
{
on
RemoveForm
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import
ServiceExtension
from
'
@ohos.app
lication
.ServiceExtensionAbility
'
import
ServiceExtension
from
'
@ohos.app
.ability
.ServiceExtensionAbility
'
import
commonEvent
from
"
@ohos.commonEvent
"
;
import
Want
from
'
@ohos.application.Want
'
;
import
rpc
from
'
@ohos.rpc
'
;
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/ApiCoverAbility.test.ets
浏览文件 @
0fcf6be4
...
...
@@ -19,10 +19,10 @@ import FormInfo from '@ohos.application.formInfo';
import
formInfoNew
from
'@ohos.app.form.formInfo'
;
import
formError
from
'@ohos.application.formError'
;
import
formHost
from
'@ohos.application.formHost'
;
import
errorManager
from
'@ohos.app
lication
.errorManager'
;
import
errorManager
from
'@ohos.app
.ability
.errorManager'
;
import
abilityConstant
from
'@ohos.app.ability.AbilityConstant'
import
appManager
from
'@ohos.application.appManager'
import
app
licationContext
from
'@ohos.application.context
'
import
app
ManagerNew
from
'@ohos.app.ability.appManager
'
import
commonEvent
from
'@ohos.commonEvent'
;
import
ability
from
'@ohos.ability.ability'
;
import
abilityDelegatorRegistry
from
'@ohos.app.ability.abilityDelegatorRegistry'
;
...
...
@@ -313,7 +313,7 @@ export default function ApiCoverTest() {
*/
it
(
'SUB_AA_ABILITY_Extension_API_012'
,
0
,
async
function
(
done
)
{
try
{
let
info
:
appManager
.
ProcessRunningInfo
;
let
info
:
appManager
New
.
ProcessRunningInfo
;
let
stageContext
:
common
.
AbilityStageContext
=
globalThis
.
stageContext
;
let
abilityContext
:
common
.
UIAbilityContext
=
globalThis
.
abilityContext
;
let
appContext
:
common
.
ApplicationContext
=
abilityContext
.
getApplicationContext
();
...
...
@@ -453,23 +453,12 @@ export default function ApiCoverTest() {
expect
(
"ohos.extra.param.key.form_name"
)
.
assertEqual
(
FormInfo
.
FormParam
.
NAME_KEY
)
expect
(
"ohos.extra.param.key.form_temporary"
)
.
assertEqual
(
FormInfo
.
FormParam
.
TEMPORARY_KEY
)
expect
(
"ohos.extra.param.key.form_identity"
)
.
assertEqual
(
FormInfo
.
FormParam
.
IDENTITY_KEY
)
expect
(
"ohos.extra.param.key.bundle_name"
)
.
assertEqual
(
FormInfo
.
FormParam
.
BUNDLE_NAME_KEY
)
expect
(
"ohos.extra.param.key.ability_name"
)
.
assertEqual
(
FormInfo
.
FormParam
.
ABILITY_NAME_KEY
)
expect
(
0
)
.
assertEqual
(
FormInfo
.
FormState
.
DEFAULT
)
expect
(
1
)
.
assertEqual
(
FormInfo
.
FormState
.
READY
)
expect
(
-
1
)
.
assertEqual
(
FormInfo
.
FormState
.
UNKNOWN
)
expect
(
0
)
.
assertEqual
(
FormInfo
.
ColorMode
.
MODE_DARK
)
expect
(
1
)
.
assertEqual
(
FormInfo
.
ColorMode
.
MODE_LIGHT
)
console
.
info
(
"SUB_AA_Form_provider_TestFormInfo_0100:"
+
FormInfo
.
FormDimension
.
Dimension_2_1
);
expect
(
1
)
.
assertEqual
(
FormInfo
.
FormDimension
.
Dimension_1_2
)
expect
(
2
)
.
assertEqual
(
FormInfo
.
FormDimension
.
Dimension_2_2
)
expect
(
3
)
.
assertEqual
(
FormInfo
.
FormDimension
.
Dimension_2_4
)
expect
(
4
)
.
assertEqual
(
FormInfo
.
FormDimension
.
Dimension_4_4
)
expect
(
5
)
.
assertEqual
(
FormInfo
.
FormDimension
.
Dimension_2_1
)
expect
(
1
)
.
assertEqual
(
FormInfo
.
FormType
.
JS
);
expect
(
2
)
.
assertEqual
(
FormInfo
.
FormType
.
eTS
);
expect
(
1
)
.
assertEqual
(
FormInfo
.
VisibilityType
.
FORM_VISIBLE
);
expect
(
2
)
.
assertEqual
(
FormInfo
.
VisibilityType
.
FORM_INVISIBLE
);
done
();
});
...
...
@@ -515,50 +504,6 @@ export default function ApiCoverTest() {
done
();
});
/*
* @tc.number SUB_AA_ReisterErrorObserver_0100
* @tc.name Test ReisterErrorObserver.
* @tc.desc Function test
* @tc.level 3
*/
it
(
'SUB_AA_ReisterErrorObserver_0100'
,
0
,
async
function
(
done
)
{
let
errorObserver
:
errorManager
.
ErrorObserver
;
errorObserver
=
{
onUnhandledException
:
(
errMessage
)
=>
{
console
.
info
(
"SUB_AA_ReisterErrorObserver_0100"
+
JSON
.
stringify
(
errMessage
));
}
}
let
errCodeId
=
errorManager
.
registerErrorObserver
(
errorObserver
)
expect
(
errCodeId
)
.
assertEqual
(
0
)
errorManager
.
unregisterErrorObserver
(
errCodeId
)
.
then
((
data
)
=>
{
expect
(
data
)
.
assertEqual
(
undefined
)
done
();
})
.
catch
((
err
)
=>
{
expect
()
.
assertFail
()
done
();
})
});
/*
* @tc.number SUB_AA_ReisterErrorObserver_0200
* @tc.name Test unregisterErrorObserver with error number.
* @tc.desc Function test
* @tc.level 3
*/
it
(
'SUB_AA_ReisterErrorObserver_0200'
,
0
,
async
function
(
done
)
{
errorManager
.
unregisterErrorObserver
(
-
1
,
(
err
,
data
)
=>
{
console
.
info
(
"SUB_AA_ReisterErrorObserver_0200:"
+
JSON
.
stringify
(
err
)
+
" "
+
JSON
.
stringify
(
data
));
console
.
info
(
"SUB_AA_ReisterErrorObserver_0200:"
+
typeof
(
err
.
code
));
if
(
err
.
code
!=
0
){
expect
(
err
.
code
)
.
assertEqual
(
-
2
)
done
()
}
else
{
expect
()
.
assertFail
()
done
();
}
})
});
/*
* @tc.number SUB_AA_Test_AbilityConstant_0100
* @tc.name Test abilityConstant.
...
...
@@ -582,9 +527,9 @@ export default function ApiCoverTest() {
* @tc.level 3
*/
it
(
'SUB_AA_Test_ProcessRunningInformation_0100'
,
0
,
async
function
(
done
)
{
let
processRunningInformation
:
appManager
.
ProcessRunningInformation
;
let
processRunningInformation
:
appManager
New
.
ProcessRunningInformation
;
let
process
;
appManager
.
getProcessRunningInformation
()
.
then
((
processRunningInformations
)
=>
{
appManager
New
.
getProcessRunningInformation
()
.
then
((
processRunningInformations
)
=>
{
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0100:"
+
JSON
.
stringify
(
processRunningInformations
));
for
(
let
i
=
0
;
i
<
processRunningInformations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0100:"
+
JSON
.
stringify
(
processRunningInformations
[
i
]));
...
...
@@ -611,11 +556,15 @@ export default function ApiCoverTest() {
*/
it
(
'SUB_AA_Test_ProcessRunningInformation_0200'
,
0
,
async
function
(
done
)
{
let
process
;
appManager
.
getProcessRunningInformation
((
error
,
processRunningInformations
)
=>
{
if
(
error
.
code
==
0
){
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0100:"
+
JSON
.
stringify
(
processRunningInformations
));
appManagerNew
.
getProcessRunningInformation
((
error
,
processRunningInformations
)
=>
{
if
(
error
)
{
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0200:"
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
()
done
()
}
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0200:"
+
JSON
.
stringify
(
processRunningInformations
));
for
(
let
i
=
0
;
i
<
processRunningInformations
.
length
;
i
++
){
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_01
00:"
+
JSON
.
stringify
(
processRunningInformations
[
i
]));
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_02
00:"
+
JSON
.
stringify
(
processRunningInformations
[
i
]));
expect
(
processRunningInformations
[
i
]
.
pid
)
.
assertLarger
(
0
)
expect
(
processRunningInformations
[
i
]
.
uid
)
.
assertLarger
(
0
)
if
(
processRunningInformations
[
i
]
.
processName
==
"com.example.apicoverhaptest"
){
...
...
@@ -624,11 +573,6 @@ export default function ApiCoverTest() {
}
expect
(
process
.
bundleNames
[
0
])
.
assertEqual
(
"com.example.apicoverhaptest"
)
done
()
}
else
{
console
.
info
(
"SUB_AA_Test_ProcessRunningInformation_0100:"
+
JSON
.
stringify
(
error
));
expect
()
.
assertFail
()
done
()
}
})
});
...
...
@@ -738,7 +682,7 @@ export default function ApiCoverTest() {
*/
it
(
'SUB_AA_FMS_AcquireForm_0100'
,
0
,
async
function
(
done
)
{
let
subscriber
=
null
let
formExtensionContext
:
applicationContext
.
FormExtensionContext
let
formExtensionContext
:
common
.
FormExtensionContext
let
pacMap
:
ability
.
PacMap
let
subscribeInfo
=
{
events
:
[
"Form_StartAbility"
]
...
...
ability/ability_runtime/apicover/apicoverhaptest/entry/src/main/ets/test/WantAgentCover.test.ets
浏览文件 @
0fcf6be4
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import wantAgent from '@ohos.wantAgent';
import wantAgent from '@ohos.
app.ability.
wantAgent';
var TAG
export default function wantAgentCoverTest() {
...
...
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/entry/src/main/ets/test/GetFormsInfoTest.test.ets
浏览文件 @
0fcf6be4
...
...
@@ -13,8 +13,8 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import formProvider from '@ohos.app
lication
.formProvider';
import formInfo from '@ohos.app
lication
.formInfo';
import formProvider from '@ohos.app
.form
.formProvider';
import formInfo from '@ohos.app
.form
.formInfo';
import formError from '@ohos.application.formError';
let module1FormInfo: formInfo.FormInfo = {
...
...
@@ -59,6 +59,7 @@ let module2FormInfo: formInfo.FormInfo = {
customizeData: {}
}
const ERR_ADD_INVALID_PARAM = 401;
var expectResult = Array();
expectResult.push(module1FormInfo);
expectResult.push(module2FormInfo);
...
...
@@ -75,7 +76,7 @@ export default function abilityTest() {
formProvider.getFormsInfo((err, value) => {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(2);
checkResultArray(expectResult, value)
done();
...
...
@@ -124,12 +125,18 @@ export default function abilityTest() {
*/
it('SUB_AA_OpenHarmony_ProviderGetForsInfo_0400', 0, async function (done) {
console.info("SUB_AA_OpenHarmony_ProviderGetForsInfo_0400");
try {
formProvider.getFormsInfo(undefined, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err.code).assertEqual(formError.FormError.ERR_ADD_INVALID_PARAM
);
expect().assertFail(
);
done();
});
})
} catch (err) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
expect(err.code).assertEqual(ERR_ADD_INVALID_PARAM);
done();
}
});
/**
...
...
@@ -143,7 +150,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(2);
checkResultArray(expectResult, value);
done();
...
...
@@ -163,7 +170,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(2);
checkResultArray(expectResult, value);
done();
...
...
@@ -183,7 +190,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(2);
checkResultArray(expectResult, value);
done();
...
...
@@ -203,7 +210,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(0);
done();
});
...
...
@@ -222,7 +229,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(1);
checkResult(module1FormInfo, value[0]);
done();
...
...
@@ -241,7 +248,7 @@ export default function abilityTest() {
formProvider.getFormsInfo(filter, function(err, value) {
console.info("formProvider::GetFormsInfoTest err: " + JSON.stringify(err));
console.info("formProvider::GetFormsInfoTest value: " + JSON.stringify(value));
expect(err
.code).assertEqual(0
);
expect(err
).assertEqual(null
);
expect(value.length).assertEqual(0);
done();
});
...
...
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module1/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -12,35 +12,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
on
Create
(
want
)
{
on
AddForm
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
onCastToNormal
Form
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
onUpdate
Form
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
on
VisibilityChange
(
newStatus
)
{
on
ChangeFormVisibility
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
on
Form
Event
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
on
Destroy
(
formId
)
{
on
RemoveForm
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
...
...
ability/ability_runtime/formmanager/stage/actsformprovidergetformsinfo/module2/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -12,35 +12,35 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
on
Create
(
want
)
{
on
AddForm
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
onCastToNormal
Form
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
onUpdate
Form
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
on
VisibilityChange
(
newStatus
)
{
on
ChangeFormVisibility
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
on
Form
Event
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
on
Destroy
(
formId
)
{
on
RemoveForm
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
...
...
ability/ability_runtime/freeinstalltest/connectabilityfatest/actsfreeinstallconnectabilityfatest/entry/src/main/ets/MainAbility/test/ConnectAbilityTest.ets
浏览文件 @
0fcf6be4
...
...
@@ -20,7 +20,7 @@ import rpc from '@ohos.rpc';
import
featureAbility
from
'@ohos.ability.featureAbility'
;
import
wantConstant
from
'@ohos.ability.wantConstant'
import
Prompt
from
'@system.prompt'
;
import
abilityManager
from
'@ohos.app
lication
.abilityManager'
;
import
abilityManager
from
'@ohos.app
.ability
.abilityManager'
;
import
AbilityDelegatorRegistry
from
'@ohos.application.abilityDelegatorRegistry'
...
...
ability/ability_runtime/freeinstalltest/startabilityforresultstagetest/actsfreeinstallstartabilityforresultstagetest/entry/src/main/ets/test/StartAbilityForResult.ets
浏览文件 @
0fcf6be4
...
...
@@ -19,7 +19,7 @@ import ability from '@ohos.app.ability.UIAbility'
import rpc from '@ohos.rpc';
import wantConstant from '@ohos.ability.wantConstant'
import Prompt from '@system.prompt';
import abilityManager from '@ohos.app
lication
.abilityManager';
import abilityManager from '@ohos.app
.ability
.abilityManager';
export default function StartAbilityForResult(abilityContext) {
...
...
ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,35 +13,35 @@
* limitations under the License.
*/
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
export
default
class
FormAbility
extends
FormExtension
{
on
Create
(
want
)
{
on
AddForm
(
want
)
{
// Called to return a FormBindingData object.
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
}
onCastToNormal
(
formId
)
{
onCastToNormal
Form
(
formId
)
{
// Called when the form provider is notified that a temporary form is successfully
// converted to a normal form.
}
onUpdate
(
formId
)
{
onUpdate
Form
(
formId
)
{
// Called to notify the form provider to update a specified form.
}
on
VisibilityChange
(
newStatus
)
{
on
ChangeFormVisibility
(
newStatus
)
{
// Called when the form provider receives form events from the system.
}
onEvent
(
formId
,
message
)
{
on
Form
Event
(
formId
,
message
)
{
// Called when a specified message event defined by the form provider is triggered.
}
on
Destroy
(
formId
)
{
on
RemoveForm
(
formId
)
{
// Called to notify the form provider that a specified form has been destroyed.
}
...
...
ability/ability_runtime/freeinstalltest/startabilitystagetest/actsfreeinstallstartabilitystagetest/entry/src/main/ets/test/StartAbilityTest.ets
浏览文件 @
0fcf6be4
...
...
@@ -21,7 +21,7 @@ import ability from '@ohos.app.ability.UIAbility'
import
rpc
from
'@ohos.rpc'
;
import
wantConstant
from
'@ohos.ability.wantConstant'
import
Prompt
from
'@system.prompt'
;
import
abilityManager
from
'@ohos.app
lication
.abilityManager'
;
import
abilityManager
from
'@ohos.app
.ability
.abilityManager'
;
import
commonEvent
from
'@ohos.commonEvent'
;
const
SYSTEM_INNER_ERROR
=
16000050
...
...
ability/ability_runtime/freeinstalltest/startabilitystagetest/atomizationstageentry/entry/src/main/ets/ServiceAbility/ServiceAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,11 +13,11 @@
* limitations under the License.
*/
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
export
default
class
ServiceAbility
extends
FormExtension
{
on
Create
(
want
)
{
on
AddForm
(
want
)
{
console
.
info
(
'
qianyiyingyong ServiceAbility onCreate
'
);
let
formData
=
{};
return
formBindingData
.
createFormBindingData
(
formData
);
...
...
@@ -27,7 +27,7 @@ export default class ServiceAbility extends FormExtension {
console
.
info
(
'
qianyiyingyong ServiceAbility onRequest
'
);
}
on
Destroy
(
formId
)
{
on
RemoveForm
(
formId
)
{
console
.
info
(
'
qianyiyingyong ServiceAbility onDestroy
'
);
}
};
\ No newline at end of file
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
bundlemanager/bundle_standard/bundlemanager/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemoone/entry/src/main/ets/ServiceAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/FormAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
bundlemanager/bundle_standard/bundlemanager/sceneProject/bmsstagedemotwo/entry/src/main/ets/ServiceAbility/FormAbility.ts
浏览文件 @
0fcf6be4
import
FormExtension
from
'
@ohos.app
lication.FormExtension
'
;
import
FormExtension
from
'
@ohos.app
.form.FormExtensionAbility
'
;
import
formBindingData
from
'
@ohos.application.formBindingData
'
;
import
formInfo
from
'
@ohos.application.formInfo
'
;
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/Application/AbilityStage.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import
AbilityStage
from
"
@ohos.app
lication
.AbilityStage
"
import
AbilityStage
from
"
@ohos.app
.ability
.AbilityStage
"
export
default
class
MyAbilityStage
extends
AbilityStage
{
onCreate
()
{
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import
Ability
from
'
@ohos.app
lication.
Ability
'
import
Ability
from
'
@ohos.app
.ability.UI
Ability
'
import
dataShare
from
'
@ohos.data.dataShare
'
import
rpc
from
"
@ohos.rpc
"
;
...
...
@@ -111,7 +111,7 @@ export default class MainAbility extends Ability {
console
.
log
(
"
[ttt] [DataShareTest] <<Consumer>> MainAbility onWindowStageCreate
"
)
globalThis
.
abilityContext
=
this
.
context
;
let
context
=
this
.
context
;
dseConnectionId
=
context
.
connectAbility
(
dseWant
,
dseConnect
);
dseConnectionId
=
context
.
connect
ServiceExtension
Ability
(
dseWant
,
dseConnect
);
globalThis
.
connectDataShareExtAbility
=
(
async
()
=>
{
console
.
log
(
"
[ttt] [DataShareTest] <<Consumer>> connectDataShareExtAbility begin
"
);
await
dataShare
.
createDataShareHelper
(
globalThis
.
abilityContext
,
dseUri
,
(
err
,
data
)
=>
{
...
...
@@ -122,7 +122,7 @@ export default class MainAbility extends Ability {
console
.
info
(
"
[ttt] [DataShareTest] <<Consumer>> ----- 3 -----, err =
"
+
err
);
console
.
info
(
"
[ttt] [DataShareTest] <<Consumer>> ----- 4 -----, JSON.stringify(err) =
"
+
JSON
.
stringify
(
err
));
});
dseConnectionId
=
await
context
.
connectAbility
(
dseWant
,
dseConnect
);
dseConnectionId
=
await
context
.
connect
ServiceExtension
Ability
(
dseWant
,
dseConnect
);
})
windowStage
.
setUIContent
(
this
.
context
,
"
MainAbility/pages/index
"
,
null
)
}
...
...
distributeddatamgr/relationalStoretest/relationalStoreStagetest/entry/src/main/ets/TestAbility/TestAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
Ability
from
'
@ohos.app
lication.
Ability
'
import
Ability
from
'
@ohos.app
.ability.UI
Ability
'
export
default
class
TestAbility
extends
Ability
{
onCreate
(
want
,
launchParam
)
{
...
...
notification/ans_standard/actsNotificationWantAgentTest/src/main/js/test/ActsNotificationWantAgentTest.js
浏览文件 @
0fcf6be4
...
...
@@ -779,72 +779,6 @@ export default function ActsNotificationWantAgentTest() {
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2800 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900
* @tc.name : function getOperationType(agent: WantAgent, callback: AsyncCallback<number>): void
* @tc.desc : Obtains the {@link OperationType} of a {@link WantAgent}
*/
it
(
'
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900 START`
)
WantAgentInfo
.
operationType
=
wantAgent
.
OperationType
.
START_ABILITY
WantAgentInfo
.
wantAgentFlags
=
[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgent
.
getWantAgent
(
WantAgentInfo
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
wantAgent
.
getOperationType
(
WantAgent
,
(
err
,
data
)
=>
{
if
(
err
.
code
)
{
console
.
info
(
`
${
TAG
}
getOperationType AsyncCallback err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
}
else
{
console
.
info
(
`
${
TAG
}
getOperationType AsyncCallback success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
done
()
}
})
}
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_2900 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000
* @tc.name : function getOperationType(agent: WantAgent): Promise<number>
* @tc.desc : Obtains the {@link OperationType} of a {@link WantAgent}
*/
it
(
'
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000
'
,
0
,
async
function
(
done
)
{
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000 START`
)
WantAgentInfo
.
operationType
=
wantAgent
.
OperationType
.
START_ABILITY
WantAgentInfo
.
wantAgentFlags
=
[
wantAgent
.
WantAgentFlags
.
UPDATE_PRESENT_FLAG
]
wantAgent
.
getWantAgent
(
WantAgentInfo
).
then
((
data
)
=>
{
WantAgent
=
data
console
.
info
(
`
${
TAG
}
getWantAgent Promise success:
${
JSON
.
stringify
(
data
)}
`
)
wantAgent
.
getOperationType
(
WantAgent
)
.
then
((
data
)
=>
{
console
.
info
(
`
${
TAG
}
getOperationType Promise success:
${
JSON
.
stringify
(
data
)}
`
)
expect
(
true
).
assertTrue
()
done
()
})
.
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getOperationType Promise err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
}).
catch
((
err
)
=>
{
console
.
info
(
`
${
TAG
}
getWantAgent Promise err:
${
err
.
code
}
`
)
expect
(
false
).
assertTrue
()
done
()
})
console
.
info
(
`
${
TAG
}
SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3000 END`
)
})
/*
* @tc.number : SUB_NOTIFICATION_ANS_GET_WANT_AGENT_TEST_3100
* @tc.name : function trigger(agent: WantAgent, triggerInfo: TriggerInfo, callback?: AsyncCallback<CompleteData>): void
...
...
request/RequestTest_Stage/entry/src/main/ets/Application/MyAbilityStage.ts
浏览文件 @
0fcf6be4
import
hilog
from
'
@ohos.hilog
'
;
import
AbilityStage
from
"
@ohos.app
lication
.AbilityStage
"
import
AbilityStage
from
"
@ohos.app
.ability
.AbilityStage
"
export
default
class
MyAbilityStage
extends
AbilityStage
{
onCreate
()
{
...
...
request/RequestTest_Stage/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -2,7 +2,7 @@ import hilog from '@ohos.hilog';
import
Window
from
'
@ohos.window
'
;
import
{
Hypium
}
from
'
@ohos/hypium
'
;
import
testsuite
from
'
../test/List.test
'
;
import
Ability
from
'
@ohos.app
lication.
Ability
'
;
import
Ability
from
'
@ohos.app
.ability.UI
Ability
'
;
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
;
export
default
class
MainAbility
extends
Ability
{
...
...
wukong/actswukongtest/entry/src/main/ets/Application/AbilityStage.ts
浏览文件 @
0fcf6be4
...
...
@@ -13,7 +13,7 @@
* limitations under the License.
*/
import
AbilityStage
from
"
@ohos.app
lication
.AbilityStage
"
import
AbilityStage
from
"
@ohos.app
.ability
.AbilityStage
"
export
default
class
MyAbilityStage
extends
AbilityStage
{
onCreate
()
{
...
...
wukong/actswukongtest/entry/src/main/ets/MainAbility/MainAbility.ts
浏览文件 @
0fcf6be4
...
...
@@ -15,7 +15,7 @@
import
AbilityDelegatorRegistry
from
'
@ohos.application.abilityDelegatorRegistry
'
import
{
Hypium
}
from
'
@ohos/hypium
'
import
testsuite
from
'
../test/List.test
'
import
Ability
from
'
@ohos.app
lication.
Ability
'
import
Ability
from
'
@ohos.app
.ability.UI
Ability
'
export
default
class
MainAbility
extends
Ability
{
onCreate
(
want
,
launchParam
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录