Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
2b691c83
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
2b691c83
编写于
3月 19, 2022
作者:
O
openharmony_ci
提交者:
Gitee
3月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
!2669 适配字幕接口
Merge pull request !2669 from yichengzhao/release
上级
b0b9e693
bee17f89
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
469 addition
and
514 deletion
+469
-514
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
...y/src/main/js/test/AccessibleCaptionConfiguration.test.js
+469
-514
未找到文件。
barrierfree/accessiblecaptionconfiguration/entry/src/main/js/test/AccessibleCaptionConfiguration.test.js
浏览文件 @
2b691c83
...
...
@@ -19,380 +19,163 @@ describe('AccessibleCaptionConfiguration', function () {
beforeEach
(
async
function
(
done
)
{
console
.
info
(
`AccessibleCaptionConfiguration: beforeEach starts`
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
"
enableChange
"
);
captionManager
.
off
(
"
styleChange
"
);
done
();
})
afterEach
(
async
function
(
done
)
{
console
.
info
(
`AccessibleCaptionConfiguration: afterEach starts`
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
"
enableChange
"
);
captionManager
.
off
(
"
styleChange
"
);
setTimeout
(
done
,
1000
);
})
var
CaptionsStyle
=
{
fontFamily
:
"
default
"
,
fontScale
:
75
,
fontColor
:
"
blue
"
,
fontEdgeType
:
"
none
"
,
backgroundColor
:
"
green
"
,
windowColor
:
"
pink
"
}
var
StyleTest
=
{
fontFamily
:
"
monospacedSerif
"
,
fontScale
:
99
,
fontColor
:
"
red
"
,
fontEdgeType
:
"
uniform
"
,
backgroundColor
:
"
pink
"
,
windowColor
:
"
green
"
}
/*
* @tc.number CaptionConfiguration_0010
* @tc.name CaptionConfiguration_0010
* @tc.desc The parameter input is 'enableChange', test the captionManager.on() function,
* and return
'enable'
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0010
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0010
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
captionManager
.
enabled
=
true
;
let
stateEventType
=
'
enableChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
data
).
assertEqual
(
false
);
done
();
});
captionManager
.
enabled
=
false
;
})
/*
* @tc.number CaptionConfiguration_0011
* @tc.name CaptionConfiguration_0011
* @tc.desc The parameter input is 'enableChange', test the captionManager.on() function,
* and return 'enable'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0011
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0011
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
stateEventType
=
'
enableChange
'
;
captionManager
.
off
(
stateEventType
);
captionManager
.
style
=
CaptionsStyle
;
captionManager
.
enabled
=
false
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
data
).
assertEqual
(
true
);
done
();
});
captionManager
.
enabled
=
true
;
let
ret
=
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_0020
* @tc.name CaptionConfiguration_0020
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return
'style'
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0020
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0020
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
=
StyleTest
;
})
/*
* @tc.number CaptionConfiguration_0021
* @tc.name CaptionConfiguration_0021
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0021
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0021
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
fontFamily
=
"
smallCapitals
"
;
})
/*
* @tc.number CaptionConfiguration_0022
* @tc.name CaptionConfiguration_0022
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0022
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0022
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
fontScale
=
99
;
})
/*
* @tc.number CaptionConfiguration_0023
* @tc.name CaptionConfiguration_0023
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0023
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0023
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
fontColor
=
"
TmepfontColor
"
;
})
/*
* @tc.number CaptionConfiguration_0024
* @tc.name CaptionConfiguration_0024
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0024
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0024
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
fontEdgeType
=
"
dropShadow
"
;
})
/*
* @tc.number CaptionConfiguration_0025
* @tc.name CaptionConfiguration_0025
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0025
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0025
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
backgroundColor
=
"
TmepbackgroundColor
"
;
let
ret
=
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_0026
* @tc.name CaptionConfiguration_0026
* @tc.desc The parameter input is 'styleChange', test the captionManager.on() function,
* and return 'style'
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0026
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0026
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
'
styleChange
'
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
style
.
windowColor
=
"
TmepwindowColor
"
;
})
/*
* @tc.number CaptionConfiguration_0030
* @tc.name CaptionConfiguration_0030
* @tc.desc The parameter input is '
enableChange', test the captionManager.off
() function,
* and return
true
* @tc.desc The parameter input is '
', test the captionManager.on
() function,
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0030
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0030
'
);
let
stateEventType
=
'
enableChange
'
;
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
enabled
=
false
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
let
ret
=
false
;
expect
(
ret
).
assertEqual
(
true
);
});
let
ret
=
captionManager
.
off
(
stateEventType
);
captionManager
.
enabled
=
true
;
expect
(
true
).
assertEqual
(
true
);
let
stateEventType
=
''
;
let
ret
=
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
31
* @tc.name CaptionConfiguration_00
31
* @tc.desc The parameter input is
'enableChange', test the captionManager.off
() function,
* and return
true
* @tc.number CaptionConfiguration_00
40
* @tc.name CaptionConfiguration_00
40
* @tc.desc The parameter input is
null, test the captionManager.on
() function,
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0031
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0031
'
);
let
stateEventType
=
'
enableChange
'
;
it
(
'
CaptionConfiguration_0040
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0040
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
enabled
=
true
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
let
ret
=
false
;
expect
(
ret
).
assertEqual
(
true
);
});
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{
expect
(
data
).
assertEqual
(
true
);
});
captionManager
.
enabled
=
false
;
expect
(
true
).
assertEqual
(
true
);
let
stateEventType
=
null
;
let
ret
=
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
32
* @tc.name CaptionConfiguration_00
32
/*
* @tc.number CaptionConfiguration_00
50
* @tc.name CaptionConfiguration_00
50
* @tc.desc The parameter input is 'enableChange', test the captionManager.off() function,
* and return
true
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0032
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0032
'
);
let
stateEventType
=
'
enableChange
'
;
it
(
'
CaptionConfiguration_0050
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0050
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
enabled
=
true
;
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
expect
(
true
).
assertEqual
(
true
);
done
();
});
captionManager
.
off
(
"
ERROR
"
,
(
data
)
=>
{
expect
(
data
).
assertEqual
(
false
);
done
();
});
let
stateEventType
=
'
enableChange
'
;
let
ret
=
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
4
0
* @tc.name CaptionConfiguration_00
4
0
* @tc.number CaptionConfiguration_00
6
0
* @tc.name CaptionConfiguration_00
6
0
* @tc.desc The parameter input is 'styleChange', test the captionManager.off() function,
* and return
true
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0040
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0040
'
);
let
stateEventType
=
'
styleChange
'
;
it
(
'
CaptionConfiguration_0060
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0060
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
let
ret
=
false
;
expect
(
ret
).
assertEqual
(
true
);
});
captionManager
.
off
(
stateEventType
);
captionManager
.
style
=
StyleTest
;
let
stateEventType
=
'
styleChange
'
;
let
ret
=
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
41
* @tc.name CaptionConfiguration_00
41
* @tc.desc The parameter input is '
styleChange
', test the captionManager.off() function,
* and return
true
* @tc.number CaptionConfiguration_00
70
* @tc.name CaptionConfiguration_00
70
* @tc.desc The parameter input is '', test the captionManager.off() function,
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0041
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0041
'
);
let
stateEventType
=
'
styleChange
'
;
it
(
'
CaptionConfiguration_0070
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0070
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
let
ret
=
false
;
expect
(
ret
).
assertEqual
(
true
);
});
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{
expect
(
data
.
fontFamily
).
assertEqual
(
StyleTest
.
fontFamily
);
expect
(
data
.
fontScale
).
assertEqual
(
StyleTest
.
fontScale
);
expect
(
data
.
fontColor
).
assertEqual
(
StyleTest
.
fontColor
);
expect
(
data
.
fontEdgeType
).
assertEqual
(
StyleTest
.
fontEdgeType
);
expect
(
data
.
backgroundColor
).
assertEqual
(
StyleTest
.
backgroundColor
);
expect
(
data
.
windowColor
).
assertEqual
(
StyleTest
.
windowColor
);
});
captionManager
.
style
=
CaptionsStyle
;
let
stateEventType
=
''
;
let
ret
=
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
42
* @tc.name CaptionConfiguration_00
42
* @tc.desc The parameter input is
'styleChange'
, test the captionManager.off() function,
* and return
true
* @tc.number CaptionConfiguration_00
80
* @tc.name CaptionConfiguration_00
80
* @tc.desc The parameter input is
null
, test the captionManager.off() function,
* and return
undefined
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0042
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0042
'
);
let
stateEventType
=
'
styleChange
'
;
it
(
'
CaptionConfiguration_0080
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0080
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
captionManager
.
off
(
stateEventType
);
captionManager
.
on
(
stateEventType
,
(
data
)
=>
{
});
captionManager
.
off
(
"
ERROR
"
,
(
data
)
=>
{
expect
(
data
).
assertEqual
(
false
);
done
();
});
let
stateEventType
=
null
;
let
ret
=
captionManager
.
off
(
stateEventType
,
(
data
)
=>
{});
expect
(
ret
).
assertEqual
(
undefined
);
done
();
})
/*
* @tc.number CaptionConfiguration_00
5
0
* @tc.name CaptionConfiguration_00
5
0
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_00
9
0
* @tc.name CaptionConfiguration_00
9
0
* @tc.desc Test
captionManager.style.fontFamily function by assigning "default"
.
*
captionManager.style.fontFamily will be "default"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_00
5
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_00
5
0
'
);
it
(
'
CaptionConfiguration_00
9
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_00
9
0
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
default
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -402,15 +185,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
051
* @tc.name CaptionConfiguration_0
051
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
100
* @tc.name CaptionConfiguration_0
100
* @tc.desc Test
captionManager.style.fontFamily function by assigning "monospacedSerif"
.
*
captionManager.style.fontFamily will be "monospacedSerif"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
051
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
051
'
);
it
(
'
CaptionConfiguration_0
100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
100
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
monospacedSerif
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -420,15 +203,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
052
* @tc.name CaptionConfiguration_0
052
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
110
* @tc.name CaptionConfiguration_0
110
* @tc.desc Test
captionManager.style.fontFamily function by assigning "serif"
.
*
captionManager.style.fontFamily will be "serif"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
052
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
052
'
);
it
(
'
CaptionConfiguration_0
110
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
110
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
serif
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -438,15 +221,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
053
* @tc.name CaptionConfiguration_0
053
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
120
* @tc.name CaptionConfiguration_0
120
* @tc.desc Test
captionManager.style.fontFamily function by assigning "monospacedSansSerif"
.
*
captionManager.style.fontFamily will be "monospacedSansSerif"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
053
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
053
'
);
it
(
'
CaptionConfiguration_0
120
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
120
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
monospacedSansSerif
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -456,15 +239,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
054
* @tc.name CaptionConfiguration_0
054
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
130
* @tc.name CaptionConfiguration_0
130
* @tc.desc Test
captionManager.style.fontFamily function by assigning "sansSerif"
.
*
captionManager.style.fontFamily will be "sansSerif"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
054
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
054
'
);
it
(
'
CaptionConfiguration_0
130
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
130
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
sansSerif
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -474,15 +257,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
055
* @tc.name CaptionConfiguration_0
055
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
140
* @tc.name CaptionConfiguration_0
140
* @tc.desc Test
captionManager.style.fontFamily function by assigning "casual"
.
*
captionManager.style.fontFamily will be "casual"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
055
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
055
'
);
it
(
'
CaptionConfiguration_0
140
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
140
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
casual
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -492,15 +275,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
056
* @tc.name CaptionConfiguration_0
056
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
150
* @tc.name CaptionConfiguration_0
150
* @tc.desc Test
captionManager.style.fontFamily function by assigning "cursive"
.
*
captionManager.style.fontFamily will be "cursive"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
056
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
056
'
);
it
(
'
CaptionConfiguration_0
150
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
150
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
cursive
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -510,15 +293,15 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
057
* @tc.name CaptionConfiguration_0
057
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
160
* @tc.name CaptionConfiguration_0
160
* @tc.desc Test
captionManager.style.fontFamily function by assigning "smallCapitals"
.
*
captionManager.style.fontFamily will be "smallCapitals"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
057
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
057
'
);
it
(
'
CaptionConfiguration_0
160
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
160
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
smallCapitals
"
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
...
...
@@ -528,17 +311,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
058
* @tc.name CaptionConfiguration_0
058
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
170
* @tc.name CaptionConfiguration_0
170
* @tc.desc Test
captionManager.style.fontFamily function by assigning ""
.
*
captionManager.style.fontFamily will be ""
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
058
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
058
'
);
it
(
'
CaptionConfiguration_0
170
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
170
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
"
none
"
;
let
fontFamily
=
""
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
let
value
=
captionManager
.
style
.
fontFamily
;
expect
(
value
).
assertEqual
(
fontFamily
);
...
...
@@ -546,35 +329,35 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
059
* @tc.name CaptionConfiguration_0
059
* @tc.desc Test
getCaptionsManager() function by modifying fontFamily
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
180
* @tc.name CaptionConfiguration_0
180
* @tc.desc Test
captionManager.style.fontFamily function by assigning null
.
*
captionManager.style.fontFamily will be ''
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
059
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
059
'
);
it
(
'
CaptionConfiguration_0
180
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
180
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontFamily
=
""
;
let
fontFamily
=
null
;
captionManager
.
style
.
fontFamily
=
fontFamily
;
let
value
=
captionManager
.
style
.
fontFamily
;
expect
(
value
).
assertEqual
(
fontFamily
);
expect
(
value
).
assertEqual
(
''
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
06
0
* @tc.name CaptionConfiguration_0
06
0
* @tc.desc Test
getCaptionsManager() function by modifying fontScale
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
19
0
* @tc.name CaptionConfiguration_0
19
0
* @tc.desc Test
captionManager.style.fontScale function by assigning 9007199254740992
.
*
captionManager.style.fontScale will be 0
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
06
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
06
0
'
);
it
(
'
CaptionConfiguration_0
19
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
19
0
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontScale
=
9007199254740992
;
let
fontScale
=
9007199254740992
;
captionManager
.
style
.
fontScale
=
fontScale
;
let
value
=
captionManager
.
style
.
fontScale
;
expect
(
value
).
assertEqual
(
0
);
...
...
@@ -582,107 +365,181 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0061
* @tc.name CaptionConfiguration_0061
* @tc.desc Test getCaptionsManager() function by modifying fontScale.
* Return CaptionsManager.
* @tc.number CaptionConfiguration_0200
* @tc.name CaptionConfiguration_0200
* @tc.desc Test captionManager.style.fontScale function by assigning 1.
* captionManager.style.fontScale will be 1
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0200
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontScale
=
1
;
captionManager
.
style
.
fontScale
=
fontScale
;
let
value
=
captionManager
.
style
.
fontScale
;
expect
(
value
).
assertEqual
(
fontScale
);
done
();
})
/*
* @tc.number CaptionConfiguration_0210
* @tc.name CaptionConfiguration_0210
* @tc.desc Test captionManager.style.fontScale function by assigning 0.
* captionManager.style.fontScale will be 0
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0061
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0061
'
);
it
(
'
CaptionConfiguration_0210
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0210
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontScale
=
0
;
captionManager
.
style
.
fontScale
=
fontScale
;
let
value
=
captionManager
.
style
.
fontScale
;
expect
(
value
).
assertEqual
(
fontScale
);
done
();
})
/*
* @tc.number CaptionConfiguration_0220
* @tc.name CaptionConfiguration_0220
* @tc.desc Test captionManager.style.fontScale function by assigning -1.
* captionManager.style.fontScale will be -1
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0220
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0220
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontScale
=
-
1
;
captionManager
.
style
.
fontScale
=
fontScale
;
let
value
=
captionManager
.
style
.
fontScale
;
expect
(
value
).
assertEqual
(
fontScale
);
done
();
})
/*
* @tc.number CaptionConfiguration_0230
* @tc.name CaptionConfiguration_0230
* @tc.desc Test captionManager.style.fontColor function by assigning "#12345678".
* captionManager.style.fontColor will be "#12345678"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0230
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0230
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
font
Scale
=
0
;
captionManager
.
style
.
font
Scale
=
fontScale
;
let
value
=
captionManager
.
style
.
font
Scale
;
expect
(
value
).
assertEqual
(
font
Scale
);
let
font
Color
=
"
#12345678
"
;
captionManager
.
style
.
font
Color
=
fontColor
;
let
value
=
captionManager
.
style
.
font
Color
;
expect
(
value
).
assertEqual
(
font
Color
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
062
* @tc.name CaptionConfiguration_0
062
* @tc.desc Test
getCaptionsManager() function by modifying fontScale
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
240
* @tc.name CaptionConfiguration_0
240
* @tc.desc Test
captionManager.style.fontColor function by assigning ""
.
*
captionManager.style.fontColor will be ""
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
062
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
062
'
);
it
(
'
CaptionConfiguration_0
240
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
240
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
font
Scale
=-
1
;
captionManager
.
style
.
font
Scale
=
fontScale
;
let
value
=
captionManager
.
style
.
font
Scale
;
expect
(
value
).
assertEqual
(
-
1
);
let
font
Color
=
"
#
"
;
captionManager
.
style
.
font
Color
=
fontColor
;
let
value
=
captionManager
.
style
.
font
Color
;
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
07
0
* @tc.name CaptionConfiguration_0
07
0
* @tc.desc Test
getCaptionsManager() function by modifying fontColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
25
0
* @tc.name CaptionConfiguration_0
25
0
* @tc.desc Test
captionManager.style.fontColor function by assigning null
.
*
captionManager.style.fontColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
07
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
07
0
'
);
it
(
'
CaptionConfiguration_0
25
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
25
0
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontColor
=
"
TmepfontColor
"
;
let
fontColor
=
null
;
captionManager
.
style
.
fontColor
=
fontColor
;
let
value
=
captionManager
.
style
.
fontColor
;
expect
(
value
).
assertEqual
(
fontColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
071
* @tc.name CaptionConfiguration_0
071
* @tc.desc Test
getCaptionsManager() function by modifying fontColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
260
* @tc.name CaptionConfiguration_0
260
* @tc.desc Test
captionManager.style.fontColor function by assigning 0x12345678
.
*
captionManager.style.fontColor will be "#34567812"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
071
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
071
'
);
it
(
'
CaptionConfiguration_0
260
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
260
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontColor
=
"
none
"
;
let
fontColor
=
0x12345678
;
captionManager
.
style
.
fontColor
=
fontColor
;
let
value
=
captionManager
.
style
.
fontColor
;
expect
(
value
).
assertEqual
(
fontColor
);
expect
(
value
).
assertEqual
(
"
#34567812
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
072
* @tc.name CaptionConfiguration_0
072
* @tc.desc Test
getCaptionsManager() function by modifying fontColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
270
* @tc.name CaptionConfiguration_0
270
* @tc.desc Test
captionManager.style.fontColor function by assigning 0
.
*
captionManager.style.fontColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
072
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
072
'
);
it
(
'
CaptionConfiguration_0
270
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
270
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontColor
=
""
;
let
fontColor
=
0
;
captionManager
.
style
.
fontColor
=
fontColor
;
let
value
=
captionManager
.
style
.
fontColor
;
expect
(
value
).
assertEqual
(
fontColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
0
80
* @tc.name CaptionConfiguration_0
0
80
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
2
80
* @tc.name CaptionConfiguration_0
2
80
* @tc.desc Test
captionManager.style.fontColor function by assigning -1
.
*
captionManager.style.fontColor will be "#ffffffff"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
0
80
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
0
80
'
);
it
(
'
CaptionConfiguration_0
2
80
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
2
80
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
none
"
;
let
fontColor
=
-
1
;
captionManager
.
style
.
fontColor
=
fontColor
;
let
value
=
captionManager
.
style
.
fontColor
;
expect
(
value
).
assertEqual
(
"
#ffffffff
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0290
* @tc.name CaptionConfiguration_0290
* @tc.desc Test captionManager.style.fontEdgeType function by assigning "none".
* captionManager.style.fontEdgeType will be "none"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0290
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0290
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
none
"
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -690,17 +547,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
081
* @tc.name CaptionConfiguration_0
081
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
300
* @tc.name CaptionConfiguration_0
300
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning "raised"
.
*
captionManager.style.fontEdgeType will be "raised"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
081
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
081
'
);
it
(
'
CaptionConfiguration_0
300
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
300
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
raised
"
;
let
fontEdgeType
=
"
raised
"
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -708,17 +565,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
082
* @tc.name CaptionConfiguration_0
082
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
310
* @tc.name CaptionConfiguration_0
310
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning "depressed"
.
*
captionManager.style.fontEdgeType will be "depressed"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
082
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
082
'
);
it
(
'
CaptionConfiguration_0
310
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
310
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
depressed
"
;
let
fontEdgeType
=
"
depressed
"
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -726,17 +583,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
083
* @tc.name CaptionConfiguration_0
083
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
320
* @tc.name CaptionConfiguration_0
320
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning "uniform"
.
*
captionManager.style.fontEdgeType will be "uniform"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
083
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
083
'
);
it
(
'
CaptionConfiguration_0
320
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
320
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
uniform
"
;
let
fontEdgeType
=
"
uniform
"
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -744,17 +601,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
084
* @tc.name CaptionConfiguration_0
084
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
330
* @tc.name CaptionConfiguration_0
330
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning "dropShadow"
.
*
captionManager.style.fontEdgeType will be "dropShadow"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
084
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
084
'
);
it
(
'
CaptionConfiguration_0
330
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
330
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
"
dropShadow
"
;
let
fontEdgeType
=
"
dropShadow
"
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -762,17 +619,17 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
085
* @tc.name CaptionConfiguration_0
085
* @tc.desc Test
getCaptionsManager() function by modifying fontEdgeType
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
340
* @tc.name CaptionConfiguration_0
340
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning ""
.
*
captionManager.style.fontEdgeType will be ""
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
085
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
085
'
);
it
(
'
CaptionConfiguration_0
340
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
340
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
""
;
let
fontEdgeType
=
""
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
fontEdgeType
);
...
...
@@ -780,17 +637,35 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
09
0
* @tc.name CaptionConfiguration_0
09
0
* @tc.desc Test
getCaptionsManager() function by modifying backgroundColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
35
0
* @tc.name CaptionConfiguration_0
35
0
* @tc.desc Test
captionManager.style.fontEdgeType function by assigning null
.
*
captionManager.style.fontEdgeType will be ''
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0090
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0090
'
);
it
(
'
CaptionConfiguration_0350
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0350
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
fontEdgeType
=
null
;
captionManager
.
style
.
fontEdgeType
=
fontEdgeType
;
let
value
=
captionManager
.
style
.
fontEdgeType
;
expect
(
value
).
assertEqual
(
''
);
done
();
})
/*
* @tc.number CaptionConfiguration_0360
* @tc.name CaptionConfiguration_0360
* @tc.desc Test captionManager.style.backgroundColor function by assigning "#12345678".
* captionManager.style.backgroundColor will be "#12345678"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0360
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0360
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
backgroundColor
=
"
TmepbackgroundColor
"
;
let
backgroundColor
=
"
#12345678
"
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
backgroundColor
);
...
...
@@ -798,53 +673,107 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
091
* @tc.name CaptionConfiguration_0
091
* @tc.desc Test
getCaptionsManager() function by modifying backgroundColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
370
* @tc.name CaptionConfiguration_0
370
* @tc.desc Test
captionManager.style.backgroundColor function by assigning ""
.
*
captionManager.style.backgroundColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
091
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
091
'
);
it
(
'
CaptionConfiguration_0
370
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
370
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
backgroundColor
=
"
none
"
;
let
backgroundColor
=
"
"
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
backgroundColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
092
* @tc.name CaptionConfiguration_0
092
* @tc.desc Test
getCaptionsManager() function by modifying backgroundColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
380
* @tc.name CaptionConfiguration_0
380
* @tc.desc Test
captionManager.style.backgroundColor function by assigning null
.
*
captionManager.style.backgroundColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
092
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
092
'
);
it
(
'
CaptionConfiguration_0
380
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
380
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
backgroundColor
=
""
;
let
backgroundColor
=
null
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
backgroundColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
10
0
* @tc.name CaptionConfiguration_0
10
0
* @tc.desc Test
getCaptionsManager() function by modifying windowColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
39
0
* @tc.name CaptionConfiguration_0
39
0
* @tc.desc Test
captionManager.style.backgroundColor function by assigning 0x12345678
.
*
captionManager.style.backgroundColor will be "#34567812"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0100
'
);
it
(
'
CaptionConfiguration_0390
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0390
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
backgroundColor
=
0x12345678
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
"
#34567812
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0400
* @tc.name CaptionConfiguration_0400
* @tc.desc Test captionManager.style.backgroundColor function by assigning 0.
* captionManager.style.backgroundColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0400
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0400
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
backgroundColor
=
0
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0410
* @tc.name CaptionConfiguration_0410
* @tc.desc Test captionManager.style.backgroundColor function by assigning -1.
* captionManager.style.backgroundColor will be "#ffffffff"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0410
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0410
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
"
TmepwindowColor
"
;
let
backgroundColor
=
-
1
;
captionManager
.
style
.
backgroundColor
=
backgroundColor
;
let
value
=
captionManager
.
style
.
backgroundColor
;
expect
(
value
).
assertEqual
(
"
#ffffffff
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0420
* @tc.name CaptionConfiguration_0420
* @tc.desc Test captionManager.style.windowColor function by assigning "#12345678".
* captionManager.style.windowColor will be "#12345678"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0420
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0420
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
"
#12345678
"
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
windowColor
);
...
...
@@ -852,89 +781,114 @@ describe('AccessibleCaptionConfiguration', function () {
})
/*
* @tc.number CaptionConfiguration_0
101
* @tc.name CaptionConfiguration_0
101
* @tc.desc Test
getCaptionsManager() function by modifying windowColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
430
* @tc.name CaptionConfiguration_0
430
* @tc.desc Test
captionManager.style.windowColor function by assigning ""
.
*
captionManager.style.windowColor will be ""
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
101
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
101
'
);
it
(
'
CaptionConfiguration_0
430
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
430
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
"
none
"
;
let
windowColor
=
""
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
windowColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
102
* @tc.name CaptionConfiguration_0
102
* @tc.desc Test
getCaptionsManager() function by modifying windowColor
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
440
* @tc.name CaptionConfiguration_0
440
* @tc.desc Test
captionManager.style.windowColor function by assigning null
.
*
captionManager.style.windowColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
102
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
102
'
);
it
(
'
CaptionConfiguration_0
440
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
440
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
""
;
let
windowColor
=
null
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
windowColor
);
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
11
0
* @tc.name CaptionConfiguration_0
11
0
* @tc.desc Test
getCaptionsManager() function by modifying style
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
45
0
* @tc.name CaptionConfiguration_0
45
0
* @tc.desc Test
captionManager.style.windowColor function by assigning 0x12345678
.
*
captionManager.style.windowColor will be "#34567812"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0
11
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
11
0
'
);
it
(
'
CaptionConfiguration_0
45
0
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0
45
0
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
StyleTest
=
{
fontFamily
:
"
monospacedSerif
"
,
fontScale
:
99
,
fontColor
:
"
red
"
,
fontEdgeType
:
"
uniform
"
,
backgroundColor
:
"
pink
"
,
windowColor
:
"
green
"
};
captionManager
.
style
=
StyleTest
;
let
value
=
captionManager
.
style
;
expect
(
value
.
fontFamily
).
assertEqual
(
StyleTest
.
fontFamily
);
expect
(
value
.
fontScale
).
assertEqual
(
StyleTest
.
fontScale
);
expect
(
value
.
fontColor
).
assertEqual
(
StyleTest
.
fontColor
);
expect
(
value
.
fontEdgeType
).
assertEqual
(
StyleTest
.
fontEdgeType
);
expect
(
value
.
backgroundColor
).
assertEqual
(
StyleTest
.
backgroundColor
);
expect
(
value
.
windowColor
).
assertEqual
(
StyleTest
.
windowColor
);
let
windowColor
=
0x12345678
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
"
#34567812
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0460
* @tc.name CaptionConfiguration_0460
* @tc.desc Test captionManager.style.windowColor function by assigning 0.
* captionManager.style.windowColor will be "#00000000"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0460
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0460
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
0
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
"
#00000000
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0
111
* @tc.name CaptionConfiguration_0
111
* @tc.desc Test
getCaptionsManager() function by modifying style
.
*
Return CaptionsManager.
* @tc.number CaptionConfiguration_0
470
* @tc.name CaptionConfiguration_0
470
* @tc.desc Test
captionManager.style.windowColor function by assigning -1
.
*
captionManager.style.windowColor will be "#ffffffff"
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0111
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0111
'
);
it
(
'
CaptionConfiguration_0470
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0470
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
windowColor
=
-
1
;
captionManager
.
style
.
windowColor
=
windowColor
;
let
value
=
captionManager
.
style
.
windowColor
;
expect
(
value
).
assertEqual
(
"
#ffffffff
"
);
done
();
})
/*
* @tc.number CaptionConfiguration_0480
* @tc.name CaptionConfiguration_0480
* @tc.desc Test captionManager.style function by assigning a value.
* Attributes of captionManager.style will be equal to that of this value
* @tc.size SmallTest
* @tc.type User
*/
it
(
'
CaptionConfiguration_0480
'
,
0
,
async
function
(
done
)
{
console
.
info
(
'
CaptionConfiguration_0480
'
);
let
captionManager
=
accessibility
.
getCaptionsManager
();
let
StyleTest
=
{
fontFamily
:
"
default
"
,
fontScale
:
75
,
fontColor
:
"
blue
"
,
fontEdgeType
:
"
none
"
,
backgroundColor
:
"
green
"
,
windowColor
:
"
pink
"
fontFamily
:
"
monospacedSerif
"
,
fontScale
:
99
,
fontColor
:
"
#12345678
"
,
fontEdgeType
:
"
uniform
"
,
backgroundColor
:
"
#23456789
"
,
windowColor
:
"
#34567890
"
};
captionManager
.
style
=
StyleTest
;
let
value
=
captionManager
.
style
;
...
...
@@ -947,4 +901,5 @@ describe('AccessibleCaptionConfiguration', function () {
done
();
})
})
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录