提交 e61400f3 编写于 作者: B bayanxing

add test cases

Signed-off-by: Nbayanxing <bayanxing@kaihongdigi.com>
上级 731b0533
...@@ -108,7 +108,6 @@ ...@@ -108,7 +108,6 @@
"pages/obj_ImageBitmap/index", "pages/obj_ImageBitmap/index",
"pages/obj_OffscreenCanvas/index", "pages/obj_OffscreenCanvas/index",
"pages/obj_OffscreenCanvasRenderingContext2D/index", "pages/obj_OffscreenCanvasRenderingContext2D/index",
"pages/textPath/index",
"pages/svg/index", "pages/svg/index",
"pages/rect/index", "pages/rect/index",
"pages/circle/index", "pages/circle/index",
......
/* /**
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
data: { data: {
title: 'World' title: 'World'
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export default { export default {
data: { data: {
title: 'World' title: 'World'
......
...@@ -422,11 +422,11 @@ ...@@ -422,11 +422,11 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{ .access-container{
flex-direction: column; flex-direction: column;
} }
.accessibility1{ .access1{
background-color: #321124; background-color: #321124;
margin: 5px; margin: 5px;
width: 90%; width: 90%;
......
...@@ -222,14 +222,14 @@ ...@@ -222,14 +222,14 @@
</div> </div>
<div style="background-color: #000000; width: 100%; height: 2px;"> <div style="background-color: #000000; width: 100%; height: 2px;">
</div> </div>
<div class="accessibility-container"> <div class="access-container">
<text class="title"> <text class="title">
无障碍 无障碍
</text> </text>
<text class="sub-title"> <text class="sub-title">
grid-col无障碍1 grid-col无障碍1
</text> </text>
<grid-col class="accessibility1" accessibilitygroup ="true" <grid-col class="access1" accessibilitygroup ="true"
accessibilitytext="这是div" accessibilitytext="这是div"
accessibilitydescription="点击此按键会弹出一个对话框" accessibilitydescription="点击此按键会弹出一个对话框"
accessibilityimportance="no-hide-descendants"> accessibilityimportance="no-hide-descendants">
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import prompt from '@system.prompt'; import prompt from '@system.prompt';
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
export default { export default {
...@@ -328,73 +411,6 @@ export default { ...@@ -328,73 +411,6 @@ export default {
functionTest3(event){ functionTest3(event){
var function3 = this.$element('function3'); var function3 = this.$element('function3');
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
var animation = function3.animate(frames, options); var animation = function3.animate(frames, options);
animation.play() animation.play()
......
...@@ -413,11 +413,11 @@ ...@@ -413,11 +413,11 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{ .access-container{
flex-direction: column; flex-direction: column;
} }
.accessibility1{ .access1{
height:20px; height:20px;
background-color: #321124; background-color: #321124;
margin: 5px; margin: 5px;
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
<text class="sub-title"> <text class="sub-title">
div无障碍1 div无障碍1
</text> </text>
<grid-container class="accessibility1" accessibilitygroup ="true" <grid-container class="access1" accessibilitygroup ="true"
accessibilitytext="这是div" accessibilitytext="这是div"
accessibilitydescription="点击此按键会弹出一个对话框" accessibilitydescription="点击此按键会弹出一个对话框"
accessibilityimportance="no-hide-descendants"> accessibilityimportance="no-hide-descendants">
......
/**
* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import prompt from '@system.prompt'; import prompt from '@system.prompt';
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
export default { export default {
onShow(){ onShow(){
// 通用属性 // 通用属性
...@@ -18,7 +102,7 @@ export default { ...@@ -18,7 +102,7 @@ export default {
console.info("getGutterWidth:"+this.$element('function4').getGutterWidth()) console.info("getGutterWidth:"+this.$element('function4').getGutterWidth())
console.info("getColumnWidth:"+this.$element('function4').getColumnWidth()) console.info("getColumnWidth:"+this.$element('function4').getColumnWidth())
console.info("getSizeType:"+this.$element('function4').getSizeType()) console.info("getSizeType:"+this.$element('function4').getSizeType())
},4 },
touchStart(event){ touchStart(event){
var globalX = event.touches[0].globalX var globalX = event.touches[0].globalX
var globalY = event.touches[0].globalY var globalY = event.touches[0].globalY
...@@ -334,74 +418,6 @@ export default { ...@@ -334,74 +418,6 @@ export default {
functionTest3(event){ functionTest3(event){
var function3 = this.$element('function3'); var function3 = this.$element('function3');
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
var animation = function3.animate(frames, options); var animation = function3.animate(frames, options);
animation.play() animation.play()
animation.onfinish = function(){ animation.onfinish = function(){
......
...@@ -422,11 +422,11 @@ ...@@ -422,11 +422,11 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{ .access-container{
flex-direction: column; flex-direction: column;
} }
.accessibility1{ .access1{
background-color: #321124; background-color: #321124;
margin: 5px; margin: 5px;
width: 90%; width: 90%;
......
...@@ -222,14 +222,14 @@ ...@@ -222,14 +222,14 @@
</div> </div>
<div style="background-color: #000000; width: 100%; height: 2px;"> <div style="background-color: #000000; width: 100%; height: 2px;">
</div> </div>
<div class="accessibility-container"> <div class="access-container">
<text class="title"> <text class="title">
无障碍 无障碍
</text> </text>
<text class="sub-title"> <text class="sub-title">
div无障碍1 div无障碍1
</text> </text>
<grid-row class="accessibility1" accessibilitygroup ="true" <grid-row class="access1" accessibilitygroup ="true"
accessibilitytext="这是div" accessibilitytext="这是div"
accessibilitydescription="点击此按键会弹出一个对话框" accessibilitydescription="点击此按键会弹出一个对话框"
accessibilityimportance="no-hide-descendants"> accessibilityimportance="no-hide-descendants">
......
import prompt from '@system.prompt'; import prompt from '@system.prompt';
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
export default { export default {
onShow(){ onShow(){
...@@ -328,73 +395,7 @@ export default { ...@@ -328,73 +395,7 @@ export default {
functionTest3(event){ functionTest3(event){
var function3 = this.$element('function3'); var function3 = this.$element('function3');
var options = {
duration: 1500,
easing: 'friction',
delay: 100,
fill: 'forwards',
iterations: 2,
direction: 'normal',
};
var frames = [
{
transform: {
translate: '-120px',
rotate:'10deg',
scale:0.2,
skew:'40deg'
},
opacity: 0.1,
offset: 0.0,
width: '40%',
height:'20px',
backgroundColor:'#ff0000',
backgroundPosition:'10px 20px',
transformOrigin:'left top'
},
{
transform: {
translateX: '0px',
translateY: '5px',
rotateX:'10deg',
rotateY:'10deg',
scaleX:0.5,
scaleY:0.7,
skewX:'22deg',
skewY:'30deg'
},
opacity: 0.6,
offset: 2.0,
width: '60%',
height:'30px',
backgroundColor:'#ff00ff',
backgroundPosition:'15px 25px',
transformOrigin:'center top'
},
{
transform: {
translateX: '100px',
translateY: '0px',
translateZ: '20px',
rotateX:'0deg',
rotateY:'0deg',
rotateZ:'30deg',
scaleX:1,
scaleY:1,
scaleZ:2,
skewX:'0',
skewY:'0',
skewZ:'30deg'
},
opacity: 1,
offset: 0.0,
width: '100%',
height:'30px',
backgroundColor:'#ffff00',
backgroundPosition:'0px',
transformOrigin:'center center'
},
];
var animation = function3.animate(frames, options); var animation = function3.animate(frames, options);
animation.play() animation.play()
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
prompt.showToast({ prompt.showToast({
message: 'offscreenCanvasCtx='+offscreenCanvasCtx+',dataURL='+dataURL+',bitmap='+JSON.stringify(bitmap) message: 'offscreenCanvasCtx='+offscreenCanvasCtx+',dataURL='+dataURL+',bitmap='+JSON.stringify(bitmap)
}); });
console.log('offscreenCanvasCtx='+offscreenCanvasCtx+',dataURL='+dataURL+',bitmap='+JSON.stringify(bitmap)); //data:image/png;base64,xxxxxx console.log('offscreenCanvasCtx='+offscreenCanvasCtx+',dataURL='+dataURL+',bitmap='+JSON.stringify(bitmap));
}, },
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -330,15 +330,6 @@ ...@@ -330,15 +330,6 @@
background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px); background: repeating-linear-gradient(to right, rgba(255, 255, 0, 1) 30px,rgba(0, 0, 255, .5) 60px);
} }
.accessibility-container{
flex-direction: column;
}
.accessibility1{
width: 100%;
height: 30px;
}
.atom-container{ .atom-container{
flex-direction: column; flex-direction: column;
} }
......
...@@ -127,7 +127,6 @@ ...@@ -127,7 +127,6 @@
background-position: center; background-position: center;
flex:1; flex:1;
flex-grow: 2; flex-grow: 2;
/* flex-basis: 10px;*/
flex-shrink: 1; flex-shrink: 1;
} }
...@@ -141,8 +140,6 @@ ...@@ -141,8 +140,6 @@
.contain1{ .contain1{
width: 100%; width: 100%;
/* height: 100px;*/
/* flex-direction: column;*/
} }
.style5{ .style5{
......
...@@ -608,78 +608,3 @@ export default { ...@@ -608,78 +608,3 @@ export default {
}); });
} }
} }
//export default {
// data: {
// title: '',
// time: '',
// controls: false,
// loop: false,
// videoSpeed: 1.0
// },
// prepared(data) {
// this.title = '视频准备完成,时间:' + data.duration + 's';
// },
// startVideo() {
// this.title = "视频播放"
// },
// pauseVideo() {
// this.title = "暂停播放"
// },
// finishVideo() {
// this.title = "播放结束"
// },
// errorVideo() {
// this.title = "播放失败"
// },
// seekingVideo(data) {
// this.title = '操作进度条至:' + data.currenttime + 's';
// },
// seekedVideo(data) {
// this.title = '操作进度条结束,转至:' + data.currenttime + 's';
// },
// timeupdateVideo(data) {
// this.time = '播放进度: ' + data.currenttime + 's';
// },
// stopVideo() {
// this.title = '操作进度条结束,转至:' + data.currenttime + 's';
// },
// play() {
// this.$element('video_1').start();
// },
// suspend() {
// this.$element('video_1').pause();
// },
// stop() {
// this.$element('video_1').stop();
// },
// stopVideo() {
// this.time = '请求停止播放';
// },
// showControls() {
// this.controls = !this.controls;
// },
// isLoop() {
// this.loop = !this.loop;
// },
// speed(flg) {
// if(flg == '0.5'){
// this.videoSpeed = 0.5;
// }else if(flg == '1'){
// this.videoSpeed = 1.0;
// }else if(flg == '2'){
// this.videoSpeed = 2.0;
// }
// },
// setCurrentTime(flg) {
// let data = {
// currenttime: flg
// }
// this.$element('video_1').setCurrentTime(data);
// },
// requestFullscreen() {
// this.$element('video_1').requestFullscreen({screenOrientation : "default"});
// }
//}
...@@ -966,4 +966,73 @@ describe('aceJsTest', function () { ...@@ -966,4 +966,73 @@ describe('aceJsTest', function () {
expect("pages/tab-content/").assertEqual(pages.path); expect("pages/tab-content/").assertEqual(pages.path);
done(); done();
}); });
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testVideoComponent
* @tc.desc ACE
*/
it('testVideoComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/video/index'
}
try {
result = router.push(options)
console.info("push video page success " + JSON.stringify(result));
} catch (err) {
console.error("push video page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.video] getState" + JSON.stringify(pages));
expect("pages/video/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testSvgTextComponent
* @tc.desc ACE
*/
it('testSvgTextComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/svg_text/index'
}
try {
result = router.push(options)
console.info("push svg_text page success " + JSON.stringify(result));
} catch (err) {
console.error("push svg_text page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.svg_text] getState" + JSON.stringify(pages));
expect("pages/svg_text/").assertEqual(pages.path);
done();
});
/**
* @tc.number SUB_ACE_BASIC_COMPONENT_JS_API_0100
* @tc.name testGridContainerComponent
* @tc.desc ACE
*/
it('testGridContainerComponent', 0, async function (done) {
let result;
let options = {
uri: 'pages/gridContainer/index'
}
try {
result = router.push(options)
console.info("push gridContainer page success " + JSON.stringify(result));
} catch (err) {
console.error("push gridContainer page error " + JSON.stringify(result));
}
await sleep(5000)
let pages = router.getState();
console.info("[router.gridContainer] getState" + JSON.stringify(pages));
expect("pages/gridContainer/").assertEqual(pages.path);
done();
});
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册