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