Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5f85c77e
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看板
提交
5f85c77e
编写于
8月 28, 2021
作者:
L
luozhewen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
startup 子系统编译整改
Signed-off-by:
N
luozhewen
<
luozhewen@huawei.com
>
上级
0bd0acda
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
1630 addition
and
1546 deletion
+1630
-1546
startup/startup_standard/BUILD.gn
startup/startup_standard/BUILD.gn
+20
-2
startup/startup_standard/entry/package.json
startup/startup_standard/entry/package.json
+0
-1
startup/startup_standard/hap/entry-debug-standard-signed.hap
startup/startup_standard/hap/entry-debug-standard-signed.hap
+0
-0
startup/startup_standard/signature/openharmony_sx.p7b
startup/startup_standard/signature/openharmony_sx.p7b
+0
-0
startup/startup_standard/src/main/config.json
startup/startup_standard/src/main/config.json
+0
-0
startup/startup_standard/src/main/js/default/app.js
startup/startup_standard/src/main/js/default/app.js
+23
-23
startup/startup_standard/src/main/js/default/i18n/en-US.json
startup/startup_standard/src/main/js/default/i18n/en-US.json
+0
-0
startup/startup_standard/src/main/js/default/i18n/zh-CN.json
startup/startup_standard/src/main/js/default/i18n/zh-CN.json
+0
-0
startup/startup_standard/src/main/js/default/pages/index/index.css
...tartup_standard/src/main/js/default/pages/index/index.css
+9
-0
startup/startup_standard/src/main/js/default/pages/index/index.hml
...tartup_standard/src/main/js/default/pages/index/index.hml
+5
-0
startup/startup_standard/src/main/js/default/pages/index/index.js
...startup_standard/src/main/js/default/pages/index/index.js
+29
-0
startup/startup_standard/src/main/js/default/test/DeviceInfoJsUnit.test.js
...tandard/src/main/js/default/test/DeviceInfoJsUnit.test.js
+1266
-1266
startup/startup_standard/src/main/js/default/test/List.test.js
...up/startup_standard/src/main/js/default/test/List.test.js
+20
-20
startup/startup_standard/src/main/js/default/test/ParametersJsUnit.test.js
...tandard/src/main/js/default/test/ParametersJsUnit.test.js
+234
-234
startup/startup_standard/src/main/resources/base/element/string.json
...rtup_standard/src/main/resources/base/element/string.json
+12
-0
startup/startup_standard/src/main/resources/base/media/icon.png
...p/startup_standard/src/main/resources/base/media/icon.png
+0
-0
updater/update_test/src/main/js/default/i18n/en-US.json
updater/update_test/src/main/js/default/i18n/en-US.json
+6
-0
updater/update_test/src/main/js/default/i18n/zh-CN.json
updater/update_test/src/main/js/default/i18n/zh-CN.json
+6
-0
未找到文件。
startup/startup_standard/BUILD.gn
浏览文件 @
5f85c77e
...
...
@@ -13,6 +13,24 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("startup_js_test") {
test_hap_name = "StartupJSApiTest"
hap_source_path = "hap/entry-debug-standard-signed.hap"
hap_profile = "./src/main/config.json"
deps = [
":startup_js_assets",
":startup_js_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "StartupJSApiTest"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
ohos_js_assets("startup_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("startup_js_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
}
\ No newline at end of file
startup/startup_standard/entry/package.json
已删除
100755 → 0
浏览文件 @
0bd0acda
{}
startup/startup_standard/hap/entry-debug-standard-signed.hap
已删除
100755 → 0
浏览文件 @
0bd0acda
文件已删除
startup/startup_standard/signature/openharmony_sx.p7b
0 → 100644
浏览文件 @
5f85c77e
文件已添加
startup/startup_standard/
entry/
src/main/config.json
→
startup/startup_standard/src/main/config.json
100755 → 100644
浏览文件 @
5f85c77e
文件已移动
startup/startup_standard/
entry/
src/main/js/default/app.js
→
startup/startup_standard/src/main/js/default/app.js
100755 → 100644
浏览文件 @
5f85c77e
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export
default
{
onCreate
()
{
console
.
info
(
'
AceApplication onCreate
'
);
},
onDestroy
()
{
console
.
info
(
'
AceApplication onDestroy
'
);
}
};
startup/startup_standard/
entry/
src/main/js/default/i18n/en-US.json
→
startup/startup_standard/src/main/js/default/i18n/en-US.json
100755 → 100644
浏览文件 @
5f85c77e
文件已移动
startup/startup_standard/
entry/
src/main/js/default/i18n/zh-CN.json
→
startup/startup_standard/src/main/js/default/i18n/zh-CN.json
100755 → 100644
浏览文件 @
5f85c77e
文件已移动
startup/startup_standard/src/main/js/default/pages/index/index.css
0 → 100644
浏览文件 @
5f85c77e
.container
{
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.title
{
font-size
:
100px
;
}
startup/startup_standard/src/main/js/default/pages/index/index.hml
0 → 100644
浏览文件 @
5f85c77e
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
startup/startup_standard/
entry/
src/main/js/default/pages/index/index.js
→
startup/startup_standard/src/main/js/default/pages/index/index.js
100755 → 100644
浏览文件 @
5f85c77e
...
...
@@ -12,11 +12,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import
file
from
'
@system.file
'
import
app
from
'
@system.app
'
//import {Core, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
import
{
Core
,
ExpectExtend
,
ReportExtend
}
from
'
deccjsunit/index
'
import
{
Core
}
from
'
deccjsunit/lite
'
const
core
=
Core
.
getInstance
()
core
.
init
()
require
(
'
../../test/List.test.js
'
)
core
.
execute
()
export
default
{
data
:
{
...
...
@@ -24,31 +25,5 @@ export default {
},
onInit
()
{
this
.
title
=
this
.
$t
(
'
strings.world
'
);
},
onShow
()
{
console
.
info
(
'
onShow finish
'
)
const
core
=
Core
.
getInstance
()
const
expectExtend
=
new
ExpectExtend
({
'
id
'
:
'
extend
'
})
const
reportExtend
=
new
ReportExtend
(
file
)
// const instrumentLog = new InstrumentLog({
// 'id': 'report'
// })
core
.
addService
(
'
expect
'
,
expectExtend
)
core
.
addService
(
'
report
'
,
reportExtend
)
// core.addService('report', instrumentLog)
core
.
init
()
// core.subscribeEvent('spec', instrumentLog)
// core.subscribeEvent('suite', instrumentLog)
// core.subscribeEvent('task', instrumentLog)
const
configService
=
core
.
getDefaultService
(
'
config
'
)
configService
.
setConfig
(
this
)
require
(
'
../../../test/List.test
'
)
core
.
execute
()
},
onReady
()
{
},
}
}
startup/startup_standard/
entry/src/main/js
/test/DeviceInfoJsUnit.test.js
→
startup/startup_standard/
src/main/js/default
/test/DeviceInfoJsUnit.test.js
100755 → 100644
浏览文件 @
5f85c77e
此差异已折叠。
点击以展开。
startup/startup_standard/
entry/src/main/js
/test/List.test.js
→
startup/startup_standard/
src/main/js/default
/test/List.test.js
100755 → 100644
浏览文件 @
5f85c77e
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require
(
'
./DeviceInfoJsUnit.test.js
'
)
require
(
'
./ParametersJsUnit.test.js
'
)
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
require
(
'
./DeviceInfoJsUnit.test.js
'
)
require
(
'
./ParametersJsUnit.test.js
'
)
startup/startup_standard/
entry/src/main/js
/test/ParametersJsUnit.test.js
→
startup/startup_standard/
src/main/js/default
/test/ParametersJsUnit.test.js
100755 → 100644
浏览文件 @
5f85c77e
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-nocheck
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
systemparameter
from
'
@ohos.systemParameter
'
describe
(
'
SystemParameterTest
'
,
function
()
{
console
.
info
(
'
SystemParameterTest start################################start
'
);
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0100
* @tc.name testSet01
* @tc.desc Set the value for the given key with parameter callback.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_001 start
'
);
var
ret
=
false
;
try
{
systemparameter
.
set
(
"
hw_sc.build.os.version
"
,
"
10.20.30.4
"
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
ret
=
true
;
console
.
info
(
"
set callback hw_sc.build.os.version value success :
"
+
data
);
}
else
{
console
.
info
(
"
set callback hw_sc.build.os.version value err:
"
+
err
.
code
);
}
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback hw_sc.build.os.version unexpect err:
"
+
e
);
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_001 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0200
* @tc.name testSet02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_002
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_002 start
'
);
var
ret
=
false
;
try
{
systemparameter
.
set
(
"
ro.secure
"
,
"
10.20.30.4
"
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
console
.
info
(
"
set callback ro.secure value success:
"
+
data
)
}
else
{
ret
=
true
;
console
.
info
(
"
set callback ro.secure value err:
"
+
err
.
code
)
}
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback ro.secure unexpect err:
"
+
e
)
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_002 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0300
* @tc.name testSet03
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_003
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_003 start
'
);
var
parameterInfo
=
systemparameter
.
set
(
"
hw_sc.build.os.version
"
,
"
1.5.3.6
"
);
var
ret
=
false
;
try
{
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
promise set hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
promise set hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback hw_sc.build.os.version unexpect err:
"
+
e
)
}
if
(
parameterInfo
!==
null
)
{
ret
=
true
;
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_003 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0400
* @tc.name testSet04
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_004
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_004 start
'
);
var
parameterInfo
=
systemparameter
.
set
(
"
ro.secure
"
,
"
10
"
);
var
ret
=
false
;
try
{
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
12333 promise set ro.secure success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
12333 promise set ro.secure error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback ro.secure unexpect err:
"
+
e
)
}
if
(
parameterInfo
!==
null
)
{
ret
=
true
;
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_004 :PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0500
* @tc.name testSetSync01
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_005
'
,
0
,
function
()
{
console
.
info
(
'
system_parameter_test_005 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
setSync
(
"
hw_sc.build.os.version
"
,
"
2.5.3.7
"
);
console
.
info
(
"
promise setSync ro.secure success:
"
+
parameterInfo
);
ret
=
true
;
}
catch
(
e
){
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_005 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0600
* @tc.name testSetSync02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_006
'
,
0
,
function
()
{
console
.
info
(
'
system_parameter_test_006 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
setSync
(
"
hw_sc.build.os.version
"
,
56789
);
console
.
info
(
"
promise setSync ro.secure success:
"
+
parameterInfo
);
}
catch
(
e
){
ret
=
true
;
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_006 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0800
* @tc.name testGet02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_008
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_008 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
get
(
"
hw_sc.build.os.version
"
);
parameterInfo
.
then
(
function
(
value
)
{
ret
=
true
;
console
.
info
(
"
promise get hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
promise get hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_008 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0150
* @tc.name testGetSync01
* @tc.desc Gets the value of the attribute with the specified key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_014
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_014 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
getSync
(
"
hw_sc.build.os.version
"
,
496
);
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
496 promise get hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
496 promise get hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
)
{
ret
=
true
;
console
.
info
(
"
promise get input error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_014 : PASS
'
);
})
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// @ts-nocheck
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
deccjsunit/index
'
import
systemparameter
from
'
@ohos.systemParameter
'
describe
(
'
SystemParameterTest
'
,
function
()
{
console
.
info
(
'
SystemParameterTest start################################start
'
);
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0100
* @tc.name testSet01
* @tc.desc Set the value for the given key with parameter callback.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_001
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_001 start
'
);
var
ret
=
false
;
try
{
systemparameter
.
set
(
"
hw_sc.build.os.version
"
,
"
10.20.30.4
"
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
ret
=
true
;
console
.
info
(
"
set callback hw_sc.build.os.version value success :
"
+
data
);
}
else
{
console
.
info
(
"
set callback hw_sc.build.os.version value err:
"
+
err
.
code
);
}
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback hw_sc.build.os.version unexpect err:
"
+
e
);
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_001 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0200
* @tc.name testSet02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_002
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_002 start
'
);
var
ret
=
false
;
try
{
systemparameter
.
set
(
"
ro.secure
"
,
"
10.20.30.4
"
,
function
(
err
,
data
)
{
if
(
err
==
undefined
)
{
console
.
info
(
"
set callback ro.secure value success:
"
+
data
)
}
else
{
ret
=
true
;
console
.
info
(
"
set callback ro.secure value err:
"
+
err
.
code
)
}
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback ro.secure unexpect err:
"
+
e
)
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_002 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0300
* @tc.name testSet03
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_003
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_003 start
'
);
var
parameterInfo
=
systemparameter
.
set
(
"
hw_sc.build.os.version
"
,
"
1.5.3.6
"
);
var
ret
=
false
;
try
{
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
promise set hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
promise set hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback hw_sc.build.os.version unexpect err:
"
+
e
)
}
if
(
parameterInfo
!==
null
)
{
ret
=
true
;
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_003 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0400
* @tc.name testSet04
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_004
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_004 start
'
);
var
parameterInfo
=
systemparameter
.
set
(
"
ro.secure
"
,
"
10
"
);
var
ret
=
false
;
try
{
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
12333 promise set ro.secure success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
12333 promise set ro.secure error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
set callback ro.secure unexpect err:
"
+
e
)
}
if
(
parameterInfo
!==
null
)
{
ret
=
true
;
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_004 :PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0500
* @tc.name testSetSync01
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_005
'
,
0
,
function
()
{
console
.
info
(
'
system_parameter_test_005 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
setSync
(
"
hw_sc.build.os.version
"
,
"
2.5.3.7
"
);
console
.
info
(
"
promise setSync ro.secure success:
"
+
parameterInfo
);
ret
=
true
;
}
catch
(
e
){
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_005 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0600
* @tc.name testSetSync02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_006
'
,
0
,
function
()
{
console
.
info
(
'
system_parameter_test_006 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
setSync
(
"
hw_sc.build.os.version
"
,
56789
);
console
.
info
(
"
promise setSync ro.secure success:
"
+
parameterInfo
);
}
catch
(
e
){
ret
=
true
;
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_006 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0800
* @tc.name testGet02
* @tc.desc Set the value for the given key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_008
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_008 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
get
(
"
hw_sc.build.os.version
"
);
parameterInfo
.
then
(
function
(
value
)
{
ret
=
true
;
console
.
info
(
"
promise get hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
promise get hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
){
console
.
info
(
"
promise setSync ro.secure error:
"
+
e
);
}
setTimeout
(
"
expect(ret).assertTrue()
"
,
"
10
"
);
console
.
info
(
'
system_parameter_test_008 : PASS
'
);
})
/**
* @tc.number SUB_STARTUP_JS_SYSTEM_PARAMETER_0150
* @tc.name testGetSync01
* @tc.desc Gets the value of the attribute with the specified key.
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it
(
'
system_parameter_test_014
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
system_parameter_test_014 start
'
);
var
ret
=
false
;
try
{
var
parameterInfo
=
systemparameter
.
getSync
(
"
hw_sc.build.os.version
"
,
496
);
parameterInfo
.
then
(
function
(
value
)
{
console
.
info
(
"
496 promise get hw_sc.build.os.version success:
"
+
value
);
}).
catch
(
function
(
err
)
{
console
.
info
(
"
496 promise get hw_sc.build.os.version error:
"
+
err
.
code
);
});
done
();
}
catch
(
e
)
{
ret
=
true
;
console
.
info
(
"
promise get input error:
"
+
e
);
}
expect
(
ret
).
assertTrue
();
console
.
info
(
'
system_parameter_test_014 : PASS
'
);
})
})
\ No newline at end of file
startup/startup_standard/src/main/resources/base/element/string.json
0 → 100644
浏览文件 @
5f85c77e
{
"string"
:
[
{
"name"
:
"app_name"
,
"value"
:
"StartupJSApiTest"
},
{
"name"
:
"mainability_description"
,
"value"
:
"JS_Phone_Empty Feature Ability"
}
]
}
\ No newline at end of file
startup/startup_standard/src/main/resources/base/media/icon.png
0 → 100644
浏览文件 @
5f85c77e
6.6 KB
updater/update_test/src/main/js/default/i18n/en-US.json
0 → 100644
浏览文件 @
5f85c77e
{
"strings"
:
{
"hello"
:
"Hello"
,
"world"
:
"World"
}
}
\ No newline at end of file
updater/update_test/src/main/js/default/i18n/zh-CN.json
0 → 100644
浏览文件 @
5f85c77e
{
"strings"
:
{
"hello"
:
"您好"
,
"world"
:
"世界"
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录