未验证 提交 12d7c8e1 编写于 作者: O openharmony_ci 提交者: Gitee

!2737 修改 xts_acts issue 缺陷 release-3.1

Merge pull request !2737 from xllify/OpenHarmony-3.1-Release
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
/*
* Copyright (C) 2021 Huawei Device Co., Ltd.
* Copyright (C) 2022 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
......
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
......
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
......@@ -17,12 +17,12 @@ import URI from '@ohos.uri'
describe('UriTest', function () {
/**
* @tc.name: testConstructor001
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_012
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor001', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_012', 0, function () {
try {
let that = new URI('#http://username:password@host:8080/directory/file?foo=1&bar=2');
} catch (err) {
......@@ -31,12 +31,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor002
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_010
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor002', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_010', 0, function () {
try {
let that = new URI({name: 'gaogao'});
} catch (err) {
......@@ -45,12 +45,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor003
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_032
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor003', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_032', 0, function () {
try {
let that = new URI('ht/tp://username:pas sword@host:8080/directory/file?foo=1&bar=2');
} catch (err) {
......@@ -59,12 +59,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor004
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_030
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor004', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_030', 0, function () {
try {
let that = new URI('http://username:password@[::]:8080/directory/file?Query#gaogao faofao');
} catch (err) {
......@@ -73,12 +73,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor005
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_028
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor005', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_028', 0, function () {
try {
let that = new URI('http://username:password@host:8080/directory/file?foo^=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -87,12 +87,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor006
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_013
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor006', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_013', 0, function () {
try {
let that = new URI('1http://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -101,12 +101,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor007
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_014
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor007', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_014', 0, function () {
try {
let that = new URI('ht@tp://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -115,12 +115,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor008
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_026
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor008', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_026', 0, function () {
try {
let that = new URI('http://username:password@[::]:80r80/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -129,12 +129,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor009
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_021
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor009', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_021', 0, function () {
try {
let that = new URI('http://username:password@[::12:55:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -143,12 +143,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor010
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_018
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor010', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_018', 0, function () {
try {
let that = new URI('http://username:pa^ssword@[::12:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -157,12 +157,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor011
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_020
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor011', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_020', 0, function () {
try {
let that = new URI('http://username:password@[::1你2:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) {
......@@ -171,12 +171,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor012
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_001
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor012', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_001', 0, function () {
let gaogao = new URI('http://gg:gaogao@www.baidu.com:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@www.baidu.com:99");
......@@ -209,12 +209,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor014
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_002
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor014', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_002', 0, function () {
let gaogao = new URI('http://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@[::]:88");
......@@ -247,12 +247,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor016
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_003
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor016', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_003', 0, function () {
let gaogao = new URI('http://gg:gaogao@[::FFFF:129.144.52.38]:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@[::FFFF:129.144.52.38]:99");
......@@ -343,12 +343,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor021
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_004
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor021', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_004', 0, function () {
let gaogao = new URI('http://gg:gaogao@199.98.55.44:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@199.98.55.44:99");
......@@ -362,12 +362,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor022
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_005
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor022', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_005', 0, function () {
let gaogao = new URI('http://16.9.5.4:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("16.9.5.4:99");
......@@ -400,12 +400,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor024
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_006
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor024', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_006', 0, function () {
let gaogao = new URI('http://user@49.10pe8.54.12:80/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@49.10pe8.54.12:80");
......@@ -419,12 +419,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor025
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_007
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor025', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_007', 0, function () {
let gaogao = new URI('http://user@www.baidu.com/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@www.baidu.com");
......@@ -438,12 +438,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor026
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_008
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor026', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_008', 0, function () {
let gaogao = new URI('http://user@www.hw.com:77/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@www.hw.com:77");
......@@ -457,12 +457,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testConstructor027
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_009
* @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testConstructor027', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_009', 0, function () {
let gaogao = new URI('ht2tp://user@www.h12343w.com:77/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("ht2tp");
expect(gaogao.authority).assertEqual("user@www.h12343w.com:77");
......@@ -565,12 +565,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testEquals002
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_034
* @tc.desc: Tests this URI for equality with another object.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testEquals002', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_034', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let res = gaogao.equals(gaogao1);
......@@ -578,12 +578,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testEquals003
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_035
* @tc.desc: Tests this URI for equality with another object.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testEquals003', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_035', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment123');
let res = gaogao.equals(gaogao1);
......@@ -617,12 +617,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testNormalize001
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_036
* @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testNormalize001', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_036', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/66./../././mm/.././path1?query#fagment');
let res = gaogao.normalize();
expect(res.path).assertEqual("/path/path1");
......@@ -630,12 +630,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testNormalize002
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_037
* @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testNormalize002', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_037', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path?query#fagment');
let res = gaogao.normalize();
expect(res.path).assertEqual("/../../path");
......@@ -656,12 +656,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testNormalize004
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_038
* @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testNormalize004', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_038', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../path/.././../aa/bb/cc?query');
let res = gaogao.normalize();
expect(res.path).assertEqual("/../../aa/bb/cc");
......@@ -669,12 +669,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testNormalize005
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_039
* @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testNormalize005', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_039', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/./path/./aa/bb/cc?query#fagment');
let res = gaogao.normalize();
expect(res.path).assertEqual("/path/aa/bb/cc");
......@@ -682,12 +682,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testToString001
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_042
* @tc.desc: Returns the content of this URI as a US-ASCII string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testToString001', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_042', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment');
let res = gaogao.toString();
expect(res).assertEqual('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment');
......@@ -718,12 +718,12 @@ describe('UriTest', function () {
})
/**
* @tc.name: testToString004
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_043
* @tc.desc: Returns the content of this URI as a US-ASCII string.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testToString004', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_043', 0, function () {
let gaogao = new URI('http://gg:gao你好gao@199.98.55.44:99/path/p你好ath?qu你好ery#fag你好ment');
let res = gaogao.toString();
expect(res).assertEqual('http://gg:gao%E4%BD%A0%E5%A5%BDgao@199.98.55.44:99/path/' +
......@@ -743,24 +743,24 @@ describe('UriTest', function () {
})
/**
* @tc.name: testCheckIsAbsolute001
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_041
* @tc.desc: Tells whether or not this URI is absolute.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testCheckIsAbsolute001', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_041', 0, function () {
let gaogao = new URI('f/tp://username:password@www.baidu.com:88/path?query#fagment');
let res = gaogao.checkIsAbsolute();
expect(res).assertEqual(false);
})
/**
* @tc.name: testCheckIsAbsolute002
* @tc.name: SUB_Runtime_JSAPI_SR000GGR34_040
* @tc.desc: Tells whether or not this URI is absolute.
* @tc.require: AR000GFB2S
* @tc.author: zhaoduwei
*/
it('testCheckIsAbsolute002', 0, function () {
it('SUB_Runtime_JSAPI_SR000GGR34_040', 0, function () {
let gaogao = new URI('ftp://username:password@www.baidu.com:88/path?query#fagment');
let res = gaogao.checkIsAbsolute();
expect(res).assertEqual(true);
......
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{title}}
......
/*
* Copyright (C) 2022 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.
*/
.container {
display: flex;
flex-direction: column;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
/*
* Copyright (C) 2022 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.
*/
.container {
display: flex;
flex-direction: column;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container">
<text class="title">
{{ $t('strings.page') }}
......
......@@ -36,32 +36,32 @@ describe('workerTest', function () {
// check worker constructor is ok
it('worker_constructor_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js")
let ss = new worker.Worker("workers/worker.js")
expect(ss != null).assertTrue()
})
it('worker_constructor_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js",{name:"second worker",shared:"False"})
let ss = new worker.Worker("workers/worker.js",{name:"second worker",shared:"False"})
expect(ss != null).assertTrue()
})
it('worker_constructor_test_003', 0, function () {
var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"second worker",shared:"false"})
let ss = new worker.Worker("workers/worker.js",{type:"classic",name:"second worker",shared:"false"})
expect(ss != null).assertTrue()
})
it('worker_constructor_test_004', 0, function () {
var ss = new worker.Worker("workers/worker.js",{type:"classic",name:"third worker",shared:"true"})
let ss = new worker.Worker("workers/worker.js",{type:"classic",name:"third worker",shared:"true"})
expect(ss != null).assertTrue()
})
// check postMessage is ok
// main post "hello world", will receive "hello world worker"
it('worker_postMessage_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_002.js");
let ss = new worker.Worker("workers/worker_002.js");
var res = undefined
var flag = false
let res = undefined
let flag = false
ss.onmessage = function (e) {
res = e.data;
......@@ -79,10 +79,10 @@ describe('workerTest', function () {
// check postMessage is ok
// main post 12 , will receive 12 * 2 + 1
it('worker_postMessage_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker_003.js");
let ss = new worker.Worker("workers/worker_003.js");
var res = undefined
var flag = false
let res = undefined
let flag = false
ss.onmessage = function (e) {
res = e.data;
......@@ -100,10 +100,10 @@ describe('workerTest', function () {
// check postMessage is ok
// main post {message:"hello world"} , will receive {message:"hello world worker"}
it('worker_postMessage_test_003', 0, async function (done) {
var ss = new worker.Worker("workers/worker_004.js");
let ss = new worker.Worker("workers/worker_004.js");
var res = undefined
var flag = false
let res = undefined
let flag = false
ss.onmessage = function (e) {
res = e.data.message;
......@@ -120,10 +120,10 @@ describe('workerTest', function () {
// check worker name is ok
it('worker_postMessage_test_004', 0, async function (done) {
var ss = new worker.Worker("workers/worker_005.js", {name: "zhangsan"});
let ss = new worker.Worker("workers/worker_005.js", {name: "zhangsan"});
var res = undefined
var flag = false
let res = undefined
let flag = false
ss.onmessage = function (e) {
res = e.data;
......@@ -140,13 +140,13 @@ describe('workerTest', function () {
// check worker transfer buffer is ok
it('worker_postMessage_test_005', 0, function () {
var ss = new worker.Worker("workers/worker_006.js");
let ss = new worker.Worker("workers/worker_006.js");
const buffer = new ArrayBuffer(8)
expect(buffer.byteLength).assertEqual(8)
ss.postMessage(buffer, [buffer])
var length = undefined;
var exception = undefined;
let length = undefined;
let exception = undefined;
try {
length = buffer.byteLength;
} catch (e) {
......@@ -165,10 +165,10 @@ describe('workerTest', function () {
// check worker handle error is ok
it('worker_postMessage_test_006', 0, async function (done) {
var ss = new worker.Worker("workers/worker_007.js");
let ss = new worker.Worker("workers/worker_007.js");
var res = undefined
var flag = false
let res = undefined
let flag = false
ss.onerror = function (e) {
res = e.message;
......@@ -185,9 +185,9 @@ describe('workerTest', function () {
// check worker terminate is ok
it('worker_terminate_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker.js");
var res = 0
var flag = false
let ss = new worker.Worker("workers/worker.js");
let res = 0
let flag = false
ss.onexit = function () {
flag = true
......@@ -203,9 +203,9 @@ describe('workerTest', function () {
// check worker terminate is ok
it('worker_terminate_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker.js");
var res = 0
var flag = false
let ss = new worker.Worker("workers/worker.js");
let res = 0
let flag = false
ss.onexit = function () {
flag = true
......@@ -225,9 +225,9 @@ describe('workerTest', function () {
// check worker terminate is ok
it('worker_terminate_test_003', 0, async function (done) {
var ss = new worker.Worker("workers/worker.js");
var res = 0
var flag = false
let ss = new worker.Worker("workers/worker.js");
let res = 0
let flag = false
ss.onexit = function () {
flag = true
......@@ -252,9 +252,9 @@ describe('workerTest', function () {
// check worker on function is ok
it('worker_on_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.on("zhangsan", ()=>{
times++;
})
......@@ -266,9 +266,9 @@ describe('workerTest', function () {
// check worker on function is ok
it('worker_on_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.on("zhangsan", ()=>{
times--;
})
......@@ -285,14 +285,14 @@ describe('workerTest', function () {
// check worker on function is ok
it('worker_on_test_003', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.on("zhangsan", ()=>{
times++;
})
for (var i=0;i<10;i++)
for (let i=0;i<10;i++)
{
ss.dispatchEvent({type: "zhangsan"})
}
......@@ -302,9 +302,9 @@ describe('workerTest', function () {
// check worker once function is ok
it('worker_once_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.once("zhangsan", ()=>{
times++;
})
......@@ -314,14 +314,14 @@ describe('workerTest', function () {
// check worker once function is ok
it('worker_once_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.once("zhangsan", ()=>{
times++;
})
for (var i=0;i<10;i++)
for (let i=0;i<10;i++)
{
ss.dispatchEvent({type: "zhangsan"})
}
......@@ -330,9 +330,9 @@ describe('workerTest', function () {
})
it('worker_once_test_003', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.once("zhangsan", ()=>{
times--;
})
......@@ -349,9 +349,9 @@ describe('workerTest', function () {
// check worker addEventListener function is ok
it('worker_addEventListener_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.addEventListener("zhangsan", ()=>{
times++;
})
......@@ -364,9 +364,9 @@ describe('workerTest', function () {
// check worker addEventListener function is ok
it('worker_addEventListener_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.addEventListener("zhangsan", ()=>{
times++;
})
......@@ -383,14 +383,14 @@ describe('workerTest', function () {
// check worker addEventListener function is ok
it('worker_addEventListener_test_003', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var times = 0;
let times = 0;
ss.addEventListener("zhangsan", ()=>{
times++;
})
for (var i=0;i<10;i++)
for (let i=0;i<10;i++)
{
ss.dispatchEvent({type: "zhangsan"})
}
......@@ -400,9 +400,9 @@ describe('workerTest', function () {
// check worker off function is ok
it('worker_off_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var zhangsan_times = 0;
let zhangsan_times = 0;
ss.on("zhangsan", ()=>{
zhangsan_times++;
})
......@@ -419,9 +419,9 @@ describe('workerTest', function () {
// check worker off function is ok
it('worker_off_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var zhangsan_times = 0;
let zhangsan_times = 0;
ss.on("zhangsan", ()=>{
zhangsan_times++;
})
......@@ -430,7 +430,7 @@ describe('workerTest', function () {
ss.dispatchEvent({type: "zhangsan"})
expect(zhangsan_times).assertEqual(2)
for (var i=0;i<3;i++)
for (let i=0;i<3;i++)
{
ss.off("zhangsan")
}
......@@ -441,9 +441,9 @@ describe('workerTest', function () {
// check worker removeEventListener function is ok
it('worker_removeListener_test_001', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var zhangsan_times = 0;
let zhangsan_times = 0;
ss.addEventListener("zhangsan", ()=>{
zhangsan_times++;
})
......@@ -460,9 +460,9 @@ describe('workerTest', function () {
// check worker removeEventListener function is ok
it('worker_removeListener_test_002', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var zhangsan_times = 0;
let zhangsan_times = 0;
ss.addEventListener("zhangsan", ()=>{
zhangsan_times++;
})
......@@ -471,7 +471,7 @@ describe('workerTest', function () {
ss.dispatchEvent({type: "zhangsan"})
expect(zhangsan_times).assertEqual(2)
for (var i=0;i<3;i++)
for (let i=0;i<3;i++)
{
ss.removeEventListener("zhangsan")
}
......@@ -483,14 +483,14 @@ describe('workerTest', function () {
// check worker removeAllListener function is ok
it('worker_removeListener_test_003', 0, function () {
var ss = new worker.Worker("workers/worker.js");
let ss = new worker.Worker("workers/worker.js");
var zhangsan_times = 0;
let zhangsan_times = 0;
ss.addEventListener("zhangsan", ()=>{
zhangsan_times++;
})
var lisi_times = 0;
let lisi_times = 0;
ss.addEventListener("lisi", ()=>{
lisi_times++;
})
......@@ -515,9 +515,9 @@ describe('workerTest', function () {
// check parentPort.close is ok
it('worker_parentPortClose_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_008.js");
var res = 0
var flag = false;
let ss = new worker.Worker("workers/worker_008.js");
let res = 0
let flag = false;
ss.onexit = function (e) {
res++;
......@@ -534,9 +534,9 @@ describe('workerTest', function () {
// check parentPort.close is ok
it('worker_parentPortClose_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker_008.js");
var res = 0
var flag = false;
let ss = new worker.Worker("workers/worker_008.js");
let res = 0
let flag = false;
ss.onexit = function () {
flag = true
......@@ -559,9 +559,9 @@ describe('workerTest', function () {
// check onmessageerror is ok
it('worker_onmessageerror_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_008.js");
var res = 0
var flag = false;
let ss = new worker.Worker("workers/worker_008.js");
let res = 0
let flag = false;
ss.onexit = function () {
flag = true
......@@ -581,9 +581,9 @@ describe('workerTest', function () {
// check onmessageerror is ok
it('worker_onmessageerror_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker_008.js");
var res = 0
var flag = false;
let ss = new worker.Worker("workers/worker_008.js");
let res = 0
let flag = false;
ss.onmessageerror = function (e) {
flag = true;
......@@ -601,9 +601,9 @@ describe('workerTest', function () {
// check new second worker is ok
it('worker_new_second_worker_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_009.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_009.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -622,9 +622,9 @@ describe('workerTest', function () {
// check new third worker is ok
it('worker_new_second_worker_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker_012.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_012.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -647,9 +647,9 @@ describe('workerTest', function () {
// check second worker postMessage number is ok
it('worker_second_worker_postMessage_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_010.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_010.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -672,9 +672,9 @@ describe('workerTest', function () {
// check second worker postMessage string is ok
it('worker_second_worker_postMessage_test_002', 0, async function (done) {
var ss = new worker.Worker("workers/worker_013.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_013.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -697,9 +697,9 @@ describe('workerTest', function () {
// check second worker postMessage array is ok
it('worker_second_worker_postMessage_test_003', 0, async function (done) {
var ss = new worker.Worker("workers/worker_014.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_014.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -723,9 +723,9 @@ describe('workerTest', function () {
// check third worker postMessage is ok
it('worker_second_worker_postMessage_test_004', 0, async function (done) {
var ss = new worker.Worker("workers/worker_015.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_015.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......@@ -748,9 +748,9 @@ describe('workerTest', function () {
// check second worker terminate is ok
it('worker_second_worker_terminate_test_001', 0, async function (done) {
var ss = new worker.Worker("workers/worker_011.js");
var flag = false;
var res = undefined;
let ss = new worker.Worker("workers/worker_011.js");
let flag = false;
let res = undefined;
ss.onmessage = function (e) {
flag = true;
......
/*
* Copyright (C) 2022 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.
*/
.container {
flex-direction: column;
justify-content: center;
......
<!--
Copyright (C) 2022 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.
-->
<div class="container" onswipe="touchMove">
<text class="title">
{{ $t('strings.hello') }} {{ title }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册