Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
41e63b29
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看板
未验证
提交
41e63b29
编写于
8月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5161 【xts_acts】【master】js测试套target参数覆盖
Merge pull request !5161 from 李晓枫/usb0805_target
上级
1f26d791
af4978ce
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
11 deletion
+13
-11
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
...usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
+13
-11
未找到文件。
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
浏览文件 @
41e63b29
...
...
@@ -260,14 +260,16 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
expect
(
true
).
assertTrue
();
})
function
getTransferParam
(
iCmd
,
iReqType
,
iValue
,
iIndex
)
{
function
getTransferParam
(
iCmd
,
iReqT
arType
,
iReqT
ype
,
iValue
,
iIndex
)
{
var
tmpUint8Array
=
new
Uint8Array
(
512
);
var
requestCmd
=
iCmd
var
requestTargetType
=
iReqTarType
var
requestType
=
iReqType
var
value
=
iValue
;
var
index
=
iIndex
;
var
controlParam
=
{
request
:
requestCmd
,
target
:
requestTargetType
,
reqType
:
requestType
,
value
:
value
,
index
:
index
,
...
...
@@ -432,7 +434,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
6
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
6
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0540 GetDescriptor
'
)
})
...
...
@@ -456,7 +458,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
0
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
0
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0550 GetStatus
'
)
})
...
...
@@ -480,7 +482,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
8
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
8
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0560 GetConfiguration
'
)
})
...
...
@@ -504,7 +506,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
10
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
10
,
usb
.
USB_REQUEST_TARGET_INTERFACE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_INTERFACE
&
0x1f
),
0
,
1
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0570 GetInterface
'
)
})
...
...
@@ -528,7 +530,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
1
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
1
,
usb
.
USB_REQUEST_TARGET_DEVICE
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_DEVICE
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0580 ClearFeature
'
)
})
...
...
@@ -552,7 +554,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_INTERFACE
,
(
usb
.
USB_REQUEST_DIR_FROM_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_STANDARD
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_INTERFACE
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0590 ClearFeature
'
)
})
...
...
@@ -576,7 +578,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_ENDPOINT
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_CLASS
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_ENDPOINT
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0600 ClearFeature
'
)
})
...
...
@@ -584,7 +586,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
/**
* @tc.number : SUB_USB_JS_0610
* @tc.name : controlTransfer
* @tc.desc : 控制传输 ClearFeature: c
c
md 255 reqType 5 value 512 index 0
* @tc.desc : 控制传输 ClearFeature: cmd 255 reqType 5 value 512 index 0
*/
it
(
'
SUB_USB_JS_0610
'
,
0
,
function
()
{
console
.
info
(
'
usb SUB_USB_JS_0610 begin
'
);
...
...
@@ -600,7 +602,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_OTHER
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_VENDOR
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_OTHER
&
0x1f
),
(
2
<<
8
),
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0610 ClearFeature
'
)
})
...
...
@@ -624,7 +626,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}
var
timeout
=
5000
;
var
controlParam
=
getTransferParam
(
255
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
var
controlParam
=
getTransferParam
(
255
,
usb
.
USB_REQUEST_TARGET_OTHER
,
(
usb
.
USB_REQUEST_DIR_TO_DEVICE
<<
7
)
|
(
usb
.
USB_REQUEST_TYPE_CLASS
<<
5
)
|
(
usb
.
USB_REQUEST_TARGET_OTHER
&
0x1f
),
0
,
0
)
callControlTransfer
(
testParam
.
pip
,
controlParam
,
timeout
,
'
SUB_USB_JS_0620 ClearFeature
'
)
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录