提交 bae2ca34 编写于 作者: H hu-jixiang1

delete L1L1 and xiugai

Signed-off-by: Nhu-jixiang1 <hujixiang1@huawei.com>
Change-Id: Idb19c3736ce65b8a1569bc8d814d9df5260fb3ef
上级 27d1424b
......@@ -608,26 +608,17 @@ describe('Hks_XtsTest_AlgCompletion_Agree', function () {
function exportKeyB(alg, size, done, caseId) {
huks.exportKey(defaultAliasB, emptyOption, function (err, data) {
if (useLib == 'openssl' && alg == huks.HuksKeyAlg.HUKS_ALG_X25519) {
expect(data.errorCode).assertEqual(huks.HuksErrorCode.HUKS_ERROR_INVALID_ARGUMENT);
done();
} else {
expect(data.errorCode).assertEqual(huks.HuksErrorCode.HUKS_SUCCESS);
publicKeyB = data.outData;
agreeKeyA(alg, size, done, caseId);
}
});
};
function exportKeyA(alg, size, done, caseId) {
huks.exportKey(defaultAliasA, emptyOption, function (err, data) {
if (useLib == 'openssl' && alg == huks.HuksKeyAlg.HUKS_ALG_X25519) {
expect(data.errorCode).assertEqual(huks.HuksErrorCode.HUKS_ERROR_INVALID_ARGUMENT);
} else {
expect(data.errorCode).assertEqual(huks.HuksErrorCode.HUKS_SUCCESS);
publicKeyA = data.outData;
}
exportKeyB(alg, size, done, caseId);
expect(data.errorCode).assertEqual(huks.HuksErrorCode.HUKS_SUCCESS);
publicKeyA = data.outData;
exportKeyB(alg, size, done, caseId);
});
};
......@@ -679,11 +670,6 @@ describe('Hks_XtsTest_AlgCompletion_Agree', function () {
var exportKeyARet = await huks.exportKey(defaultAliasA, emptyOption);
var exportKeyBRet = await huks.exportKey(defaultAliasB, emptyOption);
if (useLib == 'openssl' && alg == huks.HuksKeyAlg.HUKS_ALG_X25519) {
expect(exportKeyARet.errorCode).assertEqual(huks.HuksErrorCode.HUKS_ERROR_INVALID_ARGUMENT);
expect(exportKeyBRet.errorCode).assertEqual(huks.HuksErrorCode.HUKS_ERROR_INVALID_ARGUMENT);
done();
} else {
expect(exportKeyARet.errorCode).assertEqual(huks.HuksErrorCode.HUKS_SUCCESS);
expect(exportKeyBRet.errorCode).assertEqual(huks.HuksErrorCode.HUKS_SUCCESS);
publicKeyA = exportKeyARet.outData;
......@@ -708,6 +694,5 @@ describe('Hks_XtsTest_AlgCompletion_Agree', function () {
expect(isKeyBExist).assertEqual(false);
console.info(caseId + ' end');
done();
}
};
});
\ No newline at end of file
# 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.
import("//test/xts/tools/build/suite.gni")
group("security_huks_basic") {
testonly = true
if (is_standard_system) {
deps = [
"huks_agree_callback_BasicTest:huksagree_callback_basic_js_test",
"huks_agree_promise_BasicTest:huksagree_promise_basic_js_test",
"huks_cipher_callback_BasicTest:hukscipher_callback_basic_js_test",
"huks_cipher_promise_BasicTest:hukscipher_promise_basic_js_test",
"huks_derive_callback_BasicTest:huksderive_callback_basic_js_test",
"huks_derive_promise_BasicTest:huksderive_promise_basic_js_test",
"huks_hmac_callback_BasicTest:hukshmac_callback_basic_js_test",
"huks_hmac_promise_BasicTest:hukshmac_promise_basic_js_test",
"huks_signverify_callback_BasicTest:hukssignverify_callback_basic_js_test",
"huks_signverify_promise_BasicTest:hukssignverify_promise_basic_js_test",
]
}
}
# 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.
import("//test/xts/tools/build/suite.gni")
group("security_huks_basic") {
testonly = true
if (is_standard_system) {
deps = [
"huks_agree_promise_BasicTest:huksagree_promise_basic_js_test",
"huks_cipher_promise_BasicTest:hukscipher_promise_basic_js_test",
"huks_derive_promise_BasicTest:huksderive_promise_basic_js_test",
"huks_hmac_promise_BasicTest:hukshmac_promise_basic_js_test",
"huks_signverify_promise_BasicTest:hukssignverify_promise_basic_js_test",
"huks_agree_callback_BasicTest:huksagree_callback_basic_js_test",
"huks_cipher_callback_BasicTest:hukscipher_callback_basic_js_test",
"huks_derive_callback_BasicTest:huksderive_callback_basic_js_test",
"huks_hmac_callback_BasicTest:hukshmac_callback_basic_js_test",
"huks_signverify_callback_BasicTest:hukssignverify_callback_basic_js_test"
]
}
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksagree_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksAgreeBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksagree_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksAgreeBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -32,7 +32,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeDHCallbackJsunit', function () {
it('testAgreeDHAbort63KB001', 0, async function (done) {
it('testAgreeDH102', 0, async function (done) {
const srcKeyAliesFirst = 'testAgreeDHSize2048Abort63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
'testAgreeDHSize2048Abort63KBAgreeKeyAlias_02_001';
......
......@@ -32,7 +32,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeDHCallbackJsunit', function () {
it('testAgreeDHAbort65KB001', 0, async function (done) {
it('testAgreeDH004', 0, async function (done) {
const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_001';
......
......@@ -32,7 +32,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeDHCallbackJsunit', function () {
it('testAgreeDHFinish63KB001', 0, async function (done) {
it('testAgreeDH101', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeDHSize2048Finish63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -32,7 +32,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeDHCallbackJsunit', function () {
it('testAgreeDHFinish65KB001', 0, async function (done) {
it('testAgreeDH003', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeECDHCallbackJsunit', function () {
it('testAgreeECDHAbort63KB001', 0, async function (done) {
it('testAgreeEDCH102', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Abort63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeECDHCallbackJsunit', function () {
it('testAgreeECDHAbort65KB001', 0, async function (done) {
it('testAgreeEDCH104', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Abort65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeECDHCallbackJsunit', function () {
it('testAgreeECDHFinish63KB001', 0, async function (done) {
it('testAgreeEDCH101', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Finish63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeECDHCallbackJsunit', function () {
it('testAgreeECDHFinish65KB001', 0, async function (done) {
it('testAgreeEDCH103', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Finish65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeX25519CallbackJsunit', function () {
it('testAgreeX25519Abort63KB001', 0, async function (done) {
it('testAgreeX25519102', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Abort63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeX25519CallbackJsunit', function () {
it('testAgreeX25519Abort65KB001', 0, async function (done) {
it('testAgreeX25519004', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Abort65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksAgreeX25519CallbackJsunit', function () {
it('testAgreeX25519Finish63KB001', 0, async function (done) {
it('testAgreeX25519001', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Finish63KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeX25519CallbackJsunit', function () {
it('testAgreeX25519Finish65KB001', 0, async function (done) {
it('testAgreeX25519003', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Finish65KBAgreeKeyAlias_01_001';
const srcKeyAliesSecond =
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksagree_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksAgreeBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksagree_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksAgreeBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -32,7 +32,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeDHPromiseJsunit', function () {
it('testAgreeDHSize2048Abort65KBAgree101', 0, async function (done) {
it('testAgreeDH104', 0, async function (done) {
const srcKeyAliesFirst = 'testAgreeDHSize2048Abort65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
'testAgreeDHSize2048Abort65KBAgreeKeyAlias_02_101';
......
......@@ -32,7 +32,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeDHPromiseJsunit', function () {
it('testAgreeDHSize2048Finish65KBAgree101', 0, async function (done) {
it('testAgreeDH103', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeDHSize2048Finish65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -39,7 +39,7 @@ describe('SecurityHuksAgreeECDHPromiseJsunit', function () {
};
console.info('test beforeEach called');
});
it('testAgreeECDHAbort63KBAgree101', 0, async function (done) {
it('testAgreeECDH102', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Abort63KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -40,7 +40,7 @@ describe('SecurityHuksAgreeECDHPromiseJsunit', function () {
console.info('test beforeEach called');
});
it('testAgreeECDHAbort65KBAgree101', 0, async function (done) {
it('testAgreeECDH104', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Abort65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -51,7 +51,7 @@ describe('SecurityHuksAgreeECDHPromiseJsunit', function () {
console.info('test beforeEach called');
});
it('testAgreeECDHFinish63KBAgree101', 0, async function (done) {
it('testAgreeECDH101', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Finish63KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -40,7 +40,7 @@ describe('SecurityHuksAgreeECDHPromiseJsunit', function () {
console.info('test beforeEach called');
});
it('testAgreeECDHFinish65KBAgree101', 0, async function (done) {
it('testAgreeECDH103', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeECDHSize224Finish65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeX25519PromiseJsunit', function () {
it('testAgreeX25519Abort65KBAgree101', 0, async function (done) {
it('testAgreeX25519104', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Abort65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions63kb = {
inData: srcData63Kb,
};
describe('SecurityHuksAgreeX25519PromiseJsunit', function () {
it('testAgreeX25519Finish63KBAgree101', 0, async function (done) {
it('testAgreeX25519101', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Finish63KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
......@@ -35,7 +35,7 @@ let HuksOptions65kb = {
};
describe('SecurityHuksAgreeX25519PromiseJsunit', function () {
it('testAgreeX25519Finish65KBAgree101', 0, async function (done) {
it('testAgreeX25519103', 0, async function (done) {
const srcKeyAliesFirst =
'testAgreeX25519Size256Finish65KBAgreeKeyAlias_01_101';
const srcKeyAliesSecond =
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukscipher_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksCipherBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukscipher_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksCipherBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -39,9 +39,6 @@ let genHuksOptions = {
};
async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONECBC) {
console.log(
`test GenerateHuksOptions: ${JSON.stringify(genHuksOptionsNONECBC)}`
);
await generateKey(srcKeyAlies, genHuksOptionsNONECBC)
.then((data) => {
console.log(`test generateKey data: ${JSON.stringify(data)}`);
......@@ -68,7 +65,6 @@ function generateKey(srcKeyAlies, HuksOptions) {
}
async function publicInitFunc(srcKeyAlies, HuksOptions) {
console.log(`test init HuksOptions: ${JSON.stringify(HuksOptions)}`);
await init(srcKeyAlies, HuksOptions)
.then((data) => {
console.log(`test init data: ${JSON.stringify(data)}`);
......@@ -95,17 +91,9 @@ function init(srcKeyAlies, HuksOptions) {
}
async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
console.log(
`test update before handle: ${JSON.stringify(
handle
)} HuksOptions: ${JSON.stringify(HuksOptions)}`
);
let dateSize = 64;
let huksOptionsInData = HuksOptions.inData;
let inDataArray = HuksOptions.inData;
console.log(
'test update finish HuksOptions inData: ' + Array.from(inDataArray).length
);
if (Array.from(inDataArray).length < dateSize) {
await update(handle, HuksOptions);
// HuksOptions.inData = new Uint8Array(new Array());
......@@ -113,22 +101,10 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
} else {
let count = Math.floor(Array.from(inDataArray).length / dateSize);
let remainder = Array.from(inDataArray).length % dateSize;
console.log('test count ' + count + 'remainder ' + remainder);
for (let i = 0; i < count; i++) {
HuksOptions.inData = new Uint8Array(
Array.from(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * i,
dateSize * (i + 1)
)
)
)
);
await update(handle, HuksOptions);
}
HuksOptions.inData = huksOptionsInData;
......@@ -139,17 +115,6 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
uint8ArrayToString(inDataArray).length
)
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * count,
uint8ArrayToString(inDataArray).length
)
)
)
);
}
await publicFinishAbortFunc(
HuksOptions,
......@@ -197,11 +162,8 @@ async function publicFinishAbortFunc(
remainder
) {
if (thirdInderfaceName == 'finish') {
HuksOptions.outData = new Uint8Array(new Array(encryptedData.length * 2));
console.log(`test remainder ${remainder}`);
await finish(HuksOptions, isEncrypt);
} else if (thirdInderfaceName == 'abort') {
HuksOptions.outData = new Uint8Array(new Array(encryptedData.length * 2));
await abort(HuksOptions);
}
}
......@@ -221,20 +183,8 @@ async function finish(HuksOptions, isEncrypt) {
}
if (isEncrypt) {
if (finishData === uint8ArrayToString(encryptedData)) {
console.log(
`test finish Encrypt fail ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt fail ${uint8ArrayToString(finishData)}`
);
expect(null).assertFail();
} else {
console.log(
`test finish Encrypt success ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt success ${uint8ArrayToString(finishData)}`
);
expect(data.errorCode == 0).assertTrue();
}
}
......@@ -355,7 +305,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: srcData63Kb,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -375,7 +324,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -400,7 +348,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -425,7 +372,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: srcData63Kb,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -445,7 +391,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -470,7 +415,6 @@ describe('SecurityHuksCipherAESCallbackJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......
......@@ -40,9 +40,6 @@ let genHuksOptions = {
};
async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
console.log(
`test Generate HuksOptions: ${JSON.stringify(genHuksOptionsNONC)}`
);
await generateKey(srcKeyAlies, genHuksOptionsNONC)
.then((data) => {
console.log(`test generateKey data: ${JSON.stringify(data)}`);
......@@ -69,9 +66,6 @@ function generateKey(srcKeyAlies, HuksOptions) {
}
async function publicExportKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
console.log(
`test ExportKey HuksOptions: ${JSON.stringify(genHuksOptionsNONC)}`
);
await exportkey(srcKeyAlies, genHuksOptionsNONC)
.then((data) => {
console.log(`test ExportKey data: ${JSON.stringify(data)}`);
......@@ -100,7 +94,6 @@ function exportkey(srcKeyAlies, HuksOptions) {
async function publicImportKeyFunc(srcKeyAlies, HuksOptions) {
HuksOptions.inData = exportKey;
console.log(`test importKey HuksOptions: ${JSON.stringify(HuksOptions)}`);
await importkey(srcKeyAlies, HuksOptions)
.then((data) => {
console.log(`test ImportKey data: ${JSON.stringify(data)}`);
......@@ -127,7 +120,6 @@ function importkey(srcKeyAlies, HuksOptions) {
}
async function publicInitFunc(srcKeyAlies, HuksOptions) {
console.log(`test init HuksOptions: ${JSON.stringify(HuksOptions)}`);
await init(srcKeyAlies, HuksOptions)
.then((data) => {
console.log(`test init data: ${JSON.stringify(data)}`);
......@@ -154,17 +146,9 @@ function init(srcKeyAlies, HuksOptions) {
}
async function publicUpdateFunc(HuksOptions) {
console.log(
`test update before handle: ${JSON.stringify(
handle
)} HuksOptions: ${JSON.stringify(HuksOptions)}`
);
let dateSize = 64;
let huksOptionsInData = HuksOptions.inData;
let inDataArray = HuksOptions.inData;
console.log(
'test update finish HuksOptions inData: ' + Array.from(inDataArray).length
);
if (Array.from(inDataArray).length < dateSize) {
await update(handle, HuksOptions);
HuksOptions.inData = stringToUint8Array('0');
......@@ -175,17 +159,6 @@ async function publicUpdateFunc(HuksOptions) {
HuksOptions.inData = new Uint8Array(
Array.from(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * i,
dateSize * (i + 1)
)
)
)
);
await update(handle, HuksOptions);
HuksOptions.inData = huksOptionsInData;
}
......@@ -197,23 +170,11 @@ async function publicUpdateFunc(HuksOptions) {
)
);
await update(handle, HuksOptions);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * count,
uint8ArrayToString(inDataArray).length
)
)
)
);
}
}
}
async function update(handle, HuksOptions) {
console.log(`test update data ${JSON.stringify(HuksOptions)}`);
await updateCallback(handle, HuksOptions)
.then(async (data) => {
console.log(`test update data ${JSON.stringify(data)}`);
......@@ -244,7 +205,6 @@ async function publicFinishAbortFunc(
isEncrypt
) {
if (thirdInderfaceName == 'finish') {
HuksOptions.outData = new Uint8Array(new Array(1024));
HuksOptions.inData = new Uint8Array(new Array());
await finish(HuksOptions, isEncrypt);
} else if (thirdInderfaceName == 'abort') {
......@@ -403,7 +363,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -423,7 +382,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -450,7 +408,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -477,7 +434,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -497,7 +453,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -524,7 +479,6 @@ describe('SecurityHuksCipherRSACallbackJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukscipher_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksCipherBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukscipher_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksCipherBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -38,9 +38,6 @@ let genHuksOptions = {
};
async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONECBC) {
console.log(
`test GenerateHuksOptions: ${JSON.stringify(genHuksOptionsNONECBC)}`
);
await huks
.generateKey(srcKeyAlies, genHuksOptionsNONECBC)
.then((data) => {
......@@ -54,7 +51,6 @@ async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONECBC) {
}
async function publicInitFunc(srcKeyAlies, HuksOptions) {
console.log(`test init HuksOptions: ${JSON.stringify(HuksOptions)}`);
await huks
.init(srcKeyAlies, HuksOptions)
.then((data) => {
......@@ -69,17 +65,9 @@ async function publicInitFunc(srcKeyAlies, HuksOptions) {
}
async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
console.log(
`test update before handle: ${JSON.stringify(
handle
)} HuksOptions: ${JSON.stringify(HuksOptions)}`
);
let dateSize = 64;
let huksOptionsInData = HuksOptions.inData;
let inDataArray = HuksOptions.inData;
console.log(
'test update finish HuksOptions inData: ' + Array.from(inDataArray).length
);
if (Array.from(inDataArray).length < dateSize) {
await update(handle, HuksOptions);
HuksOptions.inData = new Uint8Array(new Array());
......@@ -87,22 +75,10 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
} else {
let count = Math.floor(Array.from(inDataArray).length / dateSize);
let remainder = Array.from(inDataArray).length % dateSize;
console.log('test count ' + count + 'remainder ' + remainder);
for (let i = 0; i < count; i++) {
HuksOptions.inData = new Uint8Array(
Array.from(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * i,
dateSize * (i + 1)
)
)
)
);
await update(handle, HuksOptions);
}
HuksOptions.inData = huksOptionsInData;
......@@ -113,17 +89,6 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
uint8ArrayToString(inDataArray).length
)
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * count,
uint8ArrayToString(inDataArray).length
)
)
)
);
} else {
HuksOptions.inData = new Uint8Array(new Array());
}
......@@ -137,8 +102,6 @@ async function publicUpdateFunc(HuksOptions, thirdInderfaceName, isEncrypt) {
}
async function update(handle, HuksOptions) {
console.log(`test update data ${JSON.stringify(HuksOptions)}`);
console.log(`test update data ${JSON.stringify(HuksOptions.inData.length)}`);
await huks
.update(handle, HuksOptions)
.then(async (data) => {
......@@ -146,11 +109,9 @@ async function update(handle, HuksOptions) {
if (updateResult.length !== 0) {
console.log(`test update outDatalength ${updateResult.length}`);
updateResult = updateResult.concat(Array.from(data.outData));
console.log(`test update outDatalength ${updateResult.length}`);
} else {
console.log(`test update outDatalength ${updateResult.length}`);
updateResult = Array.from(data.outData);
console.log(`test update outDatalength ${updateResult.length}`);
}
expect(data.errorCode == 0).assertTrue();
})
......@@ -167,11 +128,8 @@ async function publicFinishAbortFunc(
remainder
) {
if (thirdInderfaceName == 'finish') {
HuksOptions.outData = new Uint8Array(new Array(encryptedData.length * 2));
console.log(`test remainder ${remainder}`);
await finish(HuksOptions, isEncrypt);
} else if (thirdInderfaceName == 'abort') {
HuksOptions.outData = new Uint8Array(new Array(encryptedData.length * 2));
await abort(HuksOptions);
}
}
......@@ -192,39 +150,15 @@ async function finish(HuksOptions, isEncrypt) {
}
if (isEncrypt) {
if (finishData === uint8ArrayToString(encryptedData)) {
console.log(
`test finish Encrypt fail ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt fail ${uint8ArrayToString(finishData)}`
);
expect(null).assertFail();
} else {
console.log(
`test finish Encrypt success ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt success ${uint8ArrayToString(finishData)}`
);
expect(data.errorCode == 0).assertTrue();
}
}
if (!isEncrypt) {
if (finishData === uint8ArrayToString(encryptedData)) {
console.log(
`test finish Decrypt success ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Decrypt success ${uint8ArrayToString(finishData)}`
);
expect(data.errorCode == 0).assertTrue();
} else {
console.log(
`test finish Decrypt fail ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Decrypt fail ${uint8ArrayToString(finishData)}`
);
expect(null).assertFail();
}
}
......@@ -301,7 +235,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: srcData63Kb,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -321,7 +254,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -346,7 +278,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -371,7 +302,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: srcData63Kb,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -391,7 +321,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -416,7 +345,6 @@ describe('SecurityHuksCipherAESPromiseJsunit', function () {
{ tag: HksTag.HKS_TAG_IV, value: stringToUint8Array(IV) }
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......
......@@ -43,9 +43,6 @@ let genHuksOptions = {
};
async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
console.log(
`test Generate HuksOptions: ${JSON.stringify(genHuksOptionsNONC)}`
);
await huks
.generateKey(srcKeyAlies, genHuksOptionsNONC)
.then((data) => {
......@@ -59,9 +56,6 @@ async function publicGenerateKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
}
async function publicExportKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
console.log(
`test ExportKey HuksOptions: ${JSON.stringify(genHuksOptionsNONC)}`
);
await huks
.exportKey(srcKeyAlies, genHuksOptionsNONC)
.then((data) => {
......@@ -77,7 +71,6 @@ async function publicExportKeyFunc(srcKeyAlies, genHuksOptionsNONC) {
async function publicImportKeyFunc(srcKeyAlies, HuksOptions) {
HuksOptions.inData = exportKey;
console.log(`test importKey HuksOptions: ${JSON.stringify(HuksOptions)}`);
await huks
.importKey(srcKeyAlies, HuksOptions)
.then((data) => {
......@@ -106,17 +99,9 @@ async function publicInitFunc(srcKeyAlies, HuksOptions) {
}
async function publicUpdateFunc(HuksOptions) {
console.log(
`test update before handle: ${JSON.stringify(
handle
)} HuksOptions: ${JSON.stringify(HuksOptions)}`
);
let dateSize = 64;
let huksOptionsInData = HuksOptions.inData;
let inDataArray = HuksOptions.inData;
console.log(
'test update finish HuksOptions inData: ' + Array.from(inDataArray).length
);
if (Array.from(inDataArray).length < dateSize) {
await update(handle, HuksOptions);
HuksOptions.inData = stringToUint8Array('0');
......@@ -127,17 +112,6 @@ async function publicUpdateFunc(HuksOptions) {
HuksOptions.inData = new Uint8Array(
Array.from(huksOptionsInData).slice(dateSize * i, dateSize * (i + 1))
);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * i,
dateSize * (i + 1)
)
)
)
);
await update(handle, HuksOptions);
HuksOptions.inData = huksOptionsInData;
}
......@@ -149,23 +123,11 @@ async function publicUpdateFunc(HuksOptions) {
)
);
await update(handle, HuksOptions);
console.log(
'test ' +
uint8ArrayToString(
new Uint8Array(
Array.from(huksOptionsInData).slice(
dateSize * count,
uint8ArrayToString(inDataArray).length
)
)
)
);
}
}
}
async function update(handle, HuksOptions) {
console.log(`test update data ${JSON.stringify(HuksOptions)}`);
await huks
.update(handle, HuksOptions)
.then(async (data) => {
......@@ -184,7 +146,6 @@ async function publicFinishAbortFunc(
isEncrypt
) {
if (thirdInderfaceName == 'finish') {
HuksOptions.outData = new Uint8Array(new Array(1024));
HuksOptions.inData = new Uint8Array(new Array());
await finish(HuksOptions, isEncrypt);
} else if (thirdInderfaceName == 'abort') {
......@@ -193,16 +154,6 @@ async function publicFinishAbortFunc(
}
async function finish(HuksOptions, isEncrypt) {
console.log('test before finish HuksOptions inData: ' + HuksOptions.inData);
console.log('test before finish HuksOptions outData: ' + HuksOptions.outData);
console.log(
'test before finish HuksOptions outData: ' + HuksOptions.outData.length
);
console.log(
'test before finish HuksOptions properties: ' +
JSON.stringify(HuksOptions.properties)
);
await huks
.finish(handle, HuksOptions)
.then((data) => {
......@@ -212,20 +163,8 @@ async function finish(HuksOptions, isEncrypt) {
if (
uint8ArrayToString(data.outData) === uint8ArrayToString(encryptedData)
) {
console.log(
`test finish Encrypt fail ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt fail ${uint8ArrayToString(data.outData)}`
);
expect(null).assertFail();
} else {
console.log(
`test finish Encrypt success ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt success ${uint8ArrayToString(data.outData)}`
);
expect(data.errorCode == 0).assertTrue();
}
}
......@@ -233,20 +172,8 @@ async function finish(HuksOptions, isEncrypt) {
if (
uint8ArrayToString(data.outData) === uint8ArrayToString(encryptedData)
) {
console.log(
`test finish Decrypt success ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Decrypt success ${uint8ArrayToString(data.outData)}`
);
expect(data.errorCode == 0).assertTrue();
} else {
console.log(
`test finish Encrypt fail ${uint8ArrayToString(encryptedData)}`
);
console.log(
`test finish Encrypt fail ${uint8ArrayToString(data.outData)}`
);
expect(null).assertFail();
}
}
......@@ -342,7 +269,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -362,7 +288,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -389,7 +314,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -416,7 +340,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -436,7 +359,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: new Uint8Array(updateResult),
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......@@ -463,7 +385,6 @@ describe('SecurityHuksCipherRSAPromiseJsunit', function () {
HuksCipherRSA.HuksKeyRSADIGESTSHA256
),
inData: gInData64Array,
outData: stringToUint8Array('0'),
};
await publicCipherFunc(
srcKeyAlies,
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksderive_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksDeriveBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksderive_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksDeriveBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDeriveHKDFCallbackJsunit', function () {
it('testDeriveHKDFAbort63KB001', 0, async function (done) {
it('testDeriveHKDF002', 0, async function (done) {
const srcKeyAliesFirst =
'testDeriveHKDFSize128SHA256Abort63KBDeriveKeyAlias_01_001';
let huksOptionsFinish = {
......
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDeriveHKDFCallbackJsunit', function () {
it('testDeriveHKDFFinish63KB001', 0, async function (done) {
it('testDeriveHKDF001', 0, async function (done) {
const srcKeyAliesFirst =
'testDeriveHKDFSize128SHA256Finish63KBDeriveKeyAlias_01_001';
let huksOptionsFinish = {
......
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDerivePBKDF2CallbackJsunit', function () {
it('testDerivePBKDF2Abort63KB001', 0, async function (done) {
it('testDerivePBKDF2002', 0, async function (done) {
const srcKeyAliesFirst =
'testDerivePBKDF2Size128SHA256Abort63KBDeriveKeyAlias_01_001';
let huksOptionsFinish = {
......
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDerivePBKDF2CallbackJsunit', function () {
it('testDerivePBKDF2Finish63KB001', 0, async function (done) {
it('testDerivePBKDF2001', 0, async function (done) {
const srcKeyAliesFirst =
'testDerivePBKDF2Size128SHA256Finish63KBDeriveKeyAlias_01_001';
let huksOptionsFinish = {
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksderive_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksDeriveBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("huksderive_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksDeriveBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -34,7 +34,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDeriveHKDFPromiseJsunit', function () {
it('testDeriveHKDFAbort63KBDerive101', 0, async function (done) {
it('testDeriveHKDF102', 0, async function (done) {
const srcKeyAliesFirst =
'testDeriveHKDFSize128SHA256Abort63KBDeriveKeyAlias_01_101';
let huksOptionsFinish = {
......
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDeriveHKDFPromiseJsunit', function () {
it('testDeriveHKDFFinish63KBDerive101', 0, async function (done) {
it('testDeriveHKDF101', 0, async function (done) {
const srcKeyAliesFirst =
'testDeriveHKDFSize128SHA256Finish63KBDeriveKeyAlias_01_101';
let huksOptionsFinish = {
......
......@@ -33,7 +33,7 @@ let HuksOptions63kb = {
inData: srcData63Kb,
};
describe('SecurityHuksDerivePBKDF2PromiseJsunit', function () {
it('testDerivePBKDF2Abort63KBDerive101', 0, async function (done) {
it('testDerivePBKDF2102', 0, async function (done) {
const srcKeyAliesFirst =
'testDerivePBKDF2Size128SHA256Abort63KBDeriveKeyAlias_01_101';
let huksOptionsFinish = {
......
......@@ -34,7 +34,7 @@ let HuksOptions63kb = {
};
describe('SecurityHuksDerivePBKDF2PromiseJsunit', function () {
it('testDerivePBKDF2Finish63KBDerive101', 0, async function (done) {
it('testDerivePBKDF2101', 0, async function (done) {
const srcKeyAliesFirst =
'testDerivePBKDF2Size128SHA256Finish63KBDeriveKeyAlias_01_101';
let huksOptionsFinish = {
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukshmac_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksHmacBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukshmac_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksHmacBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -188,9 +188,6 @@ async function publicHmacUpdate(HuksOptions) {
async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
HuksOptions.properties.splice(1, 0, HuksHmac.HuksKeySIZE);
console.log(
'test before generateKey HuksOptions = ' + JSON.stringify(HuksOptions)
);
await generateKey(srcKeyAlies, HuksOptions)
.then((data) => {
console.log('test generateKey data = ' + JSON.stringify(data));
......@@ -201,7 +198,6 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
});
HuksOptions.properties.splice(1, 1);
console.log('test before init HuksOptions = ' + JSON.stringify(HuksOptions));
await init(srcKeyAlies, HuksOptions)
.then((data) => {
console.log(`test init data: ${JSON.stringify(data)}`);
......@@ -210,16 +206,10 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
console.log(`test init err: " + ${JSON.stringify(err)}`);
expect(null).assertFail();
});
console.log(
'test before Update HuksOptions = ' + JSON.stringify(HuksOptions)
);
await publicHmacUpdate(HuksOptions);
if (thirdInderfaceName == 'finish') {
HuksOptions.inData = new Uint8Array(stringToArray('0'));
console.log(
'test before finish HuksOptions = ' + JSON.stringify(HuksOptions)
);
await finish(handle, HuksOptions)
.then((data) => {
console.log(`test update data: ${data}`);
......@@ -229,9 +219,6 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
expect(null).assertFail();
});
} else {
console.log(
'test before abort HuksOptions = ' + JSON.stringify(HuksOptions)
);
await abort(handle, HuksOptions)
.then((data) => {
console.log(`test abort data: ${data}`);
......@@ -242,9 +229,6 @@ async function publicHmacGenFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
});
}
HuksOptions.properties.splice(1, 0, HuksHmac.HuksKeySIZE);
console.log(
'test before deleteKey HuksOptions = ' + JSON.stringify(HuksOptions)
);
await deleteKey(srcKeyAlies, HuksOptions)
.then((data) => {
console.log(`test deleteKey data: ${data}`);
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukshmac_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksHmacBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukshmac_promise_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksHmacBasicPromiseJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
......@@ -134,7 +134,6 @@ async function publicHmacFunc(srcKeyAlies, HuksOptions, thirdInderfaceName) {
}
async function update(handle, HuksOptions) {
console.log(`test update data ${JSON.stringify(HuksOptions)}`);
await huks
.update(handle, HuksOptions)
.then(async (data) => {
......
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukssignverify_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksSignVerifyBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
# 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.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("hukssignverify_callback_basic_js_test") {
hap_profile = "./entry/src/main/config.json"
deps = [
":huks_js_assets",
":huks_js_resources",
]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsHuksSignVerifyBasicCallbackJSApiTest"
}
ohos_js_assets("huks_js_assets") {
source_dir = "./entry/src/main/js/MainAbility"
}
ohos_resources("huks_js_resources") {
sources = [ "./entry/src/main/js/resources" ]
hap_profile = "./entry/src/main/config.json"
}
/*
* 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');
},
};
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
{
"strings": {
"hello": "Hello",
"world": "world",
"start": "test start"
}
}
\ No newline at end of file
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
{
"strings": {
"hello": "您好",
"world": "世界",
"start": "测试开始"
}
}
\ No newline at end of file
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.title {
font-size: 40px;
color: #000000;
opacity: 0.9;
}
@media screen and (device-type: tablet) and (orientation: landscape) {
.title {
font-size: 100px;
}
}
@media screen and (device-type: wearable) {
.title {
font-size: 28px;
color: #ffffff;
}
}
@media screen and (device-type: tv) {
.container {
background-image: url('/common/images/Wallpaper.png');
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
.title {
font-size: 100px;
color: #ffffff;
}
}
@media screen and (device-type: phone) and (orientation: landscape) {
.title {
font-size: 60px;
}
}
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
<div class="container">
<text class="title" >
{{ $t('strings.hello') }} {{ title }}
</text>
</div>
\ No newline at end of file
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
/*
* 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.
*/
import { Core, ExpectExtend } from 'deccjsunit/index';
export default {
data: {
title: '',
},
onInit() {
this.title = this.$t('strings.world');
},
onShow() {
const core = Core.getInstance();
const expectExtend = new ExpectExtend({
id: 'extend',
});
core.addService('expect', expectExtend);
core.init();
const configService = core.getDefaultService('config');
this.timeout = 1500000;
configService.setConfig(this);
console.log('test start');
require('../../../test/List.test');
core.execute();
},
onReady() {},
};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册