Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
aebfb78b
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看板
未验证
提交
aebfb78b
编写于
8月 31, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 31, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5315 【xts_acts】【master】js测试用例修改
Merge pull request !5315 from 李晓枫/usb0805_js0830
上级
0a6eabe2
65cdf57d
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
47 addition
and
43 deletion
+47
-43
usb/usb_standard/src/main/js/test/UsbAutoJsunit.test.js
usb/usb_standard/src/main/js/test/UsbAutoJsunit.test.js
+2
-2
usb/usb_standard/src/main/js/test/UsbCoreJsunit.test.js
usb/usb_standard/src/main/js/test/UsbCoreJsunit.test.js
+2
-1
usb/usb_standard/src/main/js/test/UsbCoreJsunitEx.test.js
usb/usb_standard/src/main/js/test/UsbCoreJsunitEx.test.js
+17
-20
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
...usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
+4
-1
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunitEx.test.js
...b_standard/src/main/js/test/UsbDevicePipeJsunitEx.test.js
+4
-1
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
...b_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
+4
-1
usb/usb_standard/src/main/js/test/UsbFunctionsJsunit.test.js
usb/usb_standard/src/main/js/test/UsbFunctionsJsunit.test.js
+1
-0
usb/usb_standard/src/main/js/test/UsbFunctionsJsunitEx.test.js
...sb_standard/src/main/js/test/UsbFunctionsJsunitEx.test.js
+3
-3
usb/usb_standard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
...tandard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
+4
-2
usb/usb_standard/src/main/js/test/UsbPortJsunitEx.test.js
usb/usb_standard/src/main/js/test/UsbPortJsunitEx.test.js
+6
-12
未找到文件。
usb/usb_standard/src/main/js/test/UsbAutoJsunit.test.js
浏览文件 @
aebfb78b
...
...
@@ -132,7 +132,7 @@ describe('UsbAutoJsunit', function () {
console
.
info
(
'
usb SUB_USB_JS_0980 begin
'
);
var
maskCode
=
5
var
strMaskCode
=
usb
.
usbFunctionsToString
(
maskCode
)
expect
(
strMaskCode
).
assertEqual
(
'
hdc,acm
'
);
expect
(
strMaskCode
).
assertEqual
(
'
acm,hdc
'
);
console
.
info
(
'
usb case maskCode
'
+
maskCode
+
'
usbFunctionsToString return int:
'
+
strMaskCode
);
console
.
info
(
'
usb SUB_USB_JS_0980 : PASS
'
);
})
...
...
@@ -146,7 +146,7 @@ describe('UsbAutoJsunit', function () {
console
.
info
(
'
usb SUB_USB_JS_0990 begin
'
);
var
maskCode
=
6
var
strMaskCode
=
usb
.
usbFunctionsToString
(
maskCode
)
expect
(
strMaskCode
).
assertEqual
(
'
hdc,ecm
'
);
expect
(
strMaskCode
).
assertEqual
(
'
ecm,hdc
'
);
console
.
info
(
'
usb case maskCode
'
+
maskCode
+
'
usbFunctionsToString return int:
'
+
strMaskCode
);
console
.
info
(
'
usb SUB_USB_JS_0990 : PASS
'
);
})
...
...
usb/usb_standard/src/main/js/test/UsbCoreJsunit.test.js
浏览文件 @
aebfb78b
...
...
@@ -141,6 +141,7 @@ describe('UsbCoreJsFunctionsTest', function () {
console
.
info
(
'
usb case device request right failed :
'
+
error
+
'
:
'
+
gDeviceList
[
i
].
name
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
5000
);
}
})
...
...
@@ -168,7 +169,7 @@ describe('UsbCoreJsFunctionsTest', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb 01 requestRight error:
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
gPipe
=
usb
.
connectDevice
(
gDeviceList
[
0
])
...
...
usb/usb_standard/src/main/js/test/UsbCoreJsunitEx.test.js
浏览文件 @
aebfb78b
...
...
@@ -41,6 +41,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRolesEx error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit Begin switch to host*************
'
);
}
}
else
{
...
...
@@ -84,7 +85,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb JS_0100 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb JS_0100 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -126,7 +127,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb JS_0110 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb JS_0110 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -167,7 +168,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb JS_0120 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb JS_0120 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -211,7 +212,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb JS_0130 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb JS_0130 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -223,10 +224,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb connectDevice fail:
'
+
err
);
}
console
.
info
(
'
usb case connectDevice ret:
'
+
JSON
.
stringify
(
usbDevicePipe
)
+
'
name
'
+
device
.
name
);
expect
(
CheckEmptyUtils
.
isEmpty
(
usbDevicePipe
)).
assertFalse
();
var
isPipClose
=
usb
.
closePipe
(
usbDevicePipe
);
console
.
info
(
'
usb case closePipe ret:
'
+
isPipClose
);
expect
(
isPipClose
).
assertEqual
(
0
);
expect
(
CheckEmptyUtils
.
isEmpty
(
usbDevicePipe
)).
assertTrue
();
console
.
info
(
'
usb SUB_USB_JS_0130 : PASS
'
);
})
...
...
@@ -254,7 +252,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb JS_0140 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb JS_0140 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -267,10 +265,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
}
console
.
info
(
'
usb case connectDevice ret:
'
+
JSON
.
stringify
(
usbDevicePipe
)
+
'
manufacturerName
'
+
device
.
manufacturerName
);
expect
(
CheckEmptyUtils
.
isEmpty
(
usbDevicePipe
)).
assertFalse
();
var
isPipClose
=
usb
.
closePipe
(
usbDevicePipe
);
console
.
info
(
'
usb case closePipe ret:
'
+
isPipClose
);
expect
(
isPipClose
).
assertEqual
(
0
);
expect
(
CheckEmptyUtils
.
isEmpty
(
usbDevicePipe
)).
assertTrue
();
console
.
info
(
'
usb SUB_USB_JS_0140 : PASS
'
);
})
...
...
@@ -298,7 +293,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0150 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0150 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -342,7 +337,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0160 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0160 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -386,7 +381,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0170 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0170 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -430,7 +425,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0180 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0180 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -474,7 +469,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0190 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0190 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -517,7 +512,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0200 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0200 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -560,7 +555,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console
.
info
(
'
usb SUB_USB_JS_0210 requestRight error:
'
+
error
);
});
console
.
info
(
'
usb SUB_USB_JS_0210 requestRight end:
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
5
000
)
}
var
device
=
JSON
.
parse
(
JSON
.
stringify
(
gDeviceList
[
0
]));
...
...
@@ -668,6 +663,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0690 error:
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
5000
);
}
})
...
...
@@ -700,6 +696,7 @@ describe('UsbCoreJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0700 error:
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
5000
);
}
})
})
...
...
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit.test.js
浏览文件 @
aebfb78b
...
...
@@ -43,6 +43,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit switch to host Begin*************
'
);
}
}
else
{
...
...
@@ -171,6 +172,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console
.
info
(
'
usb case readData error :
'
+
JSON
.
stringify
(
error
));
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -212,7 +214,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console
.
info
(
'
usb write error :
'
+
JSON
.
stringify
(
error
));
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -413,6 +415,7 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console
.
info
(
'
usb
'
+
caseName
+
'
: PASS
'
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
}
/**
...
...
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunitEx.test.js
浏览文件 @
aebfb78b
...
...
@@ -45,7 +45,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
});
console
.
log
(
'
*************Usb Unit switch to host Ex Begin*************
'
);
CheckEmptyUtils
.
sleep
(
3
000
)
CheckEmptyUtils
.
sleep
(
8
000
)
}
}
else
{
portCurrentMode
=
1
...
...
@@ -174,6 +174,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect
(
false
).
assertFalse
();
console
.
info
(
'
usb case SUB_USB_JS_0650 : PASS
'
);
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -210,6 +211,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect
(
false
).
assertFalse
();
console
.
info
(
'
usb case SUB_USB_JS_0660 : PASS
'
);
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -246,6 +248,7 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
expect
(
false
).
assertFalse
();
console
.
info
(
'
usb case SUB_USB_JS_0670 : PASS
'
);
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
usb/usb_standard/src/main/js/test/UsbDevicePipeJsunit_A.test.js
浏览文件 @
aebfb78b
...
...
@@ -42,6 +42,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit switch to host Begin*************
'
);
}
}
else
{
...
...
@@ -177,6 +178,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console
.
info
(
'
usb case readData error :
'
+
JSON
.
stringify
(
error
));
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -218,7 +220,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console
.
info
(
'
usb write error :
'
+
JSON
.
stringify
(
error
));
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
})
/**
...
...
@@ -428,6 +430,7 @@ describe('UsbDevicePipeJsFunctionsTestA', function () {
console
.
info
(
'
usb
'
+
caseName
+
'
: PASS
'
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
3000
);
}
/**
...
...
usb/usb_standard/src/main/js/test/UsbFunctionsJsunit.test.js
浏览文件 @
aebfb78b
...
...
@@ -34,6 +34,7 @@ describe('UsbFunctionsJsFunctionsTest', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit switch to device Begin*************
'
);
}
}
...
...
usb/usb_standard/src/main/js/test/UsbFunctionsJsunitEx.test.js
浏览文件 @
aebfb78b
...
...
@@ -33,7 +33,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit switch to device Begin*************
'
);
}
}
...
...
@@ -135,7 +135,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
var
maskCode
=
usb
.
ACM
|
usb
.
HDC
console
.
info
(
'
usb case maskCode :
'
+
maskCode
);
var
strMaskCode
=
usb
.
usbFunctionsToString
(
maskCode
)
expect
(
strMaskCode
).
assertEqual
(
'
hdc,acm
'
);
expect
(
strMaskCode
).
assertEqual
(
'
acm,hdc
'
);
console
.
info
(
'
usb case maskCode
'
+
maskCode
+
'
usbFunctionsToString return int:
'
+
strMaskCode
);
console
.
info
(
'
usb SUB_USB_JS_0980 : PASS
'
);
})
...
...
@@ -150,7 +150,7 @@ describe('UsbFunctionsJsFunctionsTestEx', function () {
var
maskCode
=
usb
.
ECM
|
usb
.
HDC
console
.
info
(
'
usb case maskCode :
'
+
maskCode
);
var
strMaskCode
=
usb
.
usbFunctionsToString
(
maskCode
)
expect
(
strMaskCode
).
assertEqual
(
'
hdc,ecm
'
);
expect
(
strMaskCode
).
assertEqual
(
'
ecm,hdc
'
);
console
.
info
(
'
usb case maskCode
'
+
maskCode
+
'
usbFunctionsToString return int:
'
+
strMaskCode
);
console
.
info
(
'
usb SUB_USB_JS_0990 : PASS
'
);
})
...
...
usb/usb_standard/src/main/js/test/UsbPortAndFunctionJsunit.test.js
浏览文件 @
aebfb78b
...
...
@@ -34,6 +34,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
}).
catch
(
error
=>
{
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
});
CheckEmptyUtils
.
sleep
(
8000
)
console
.
log
(
'
*************Usb Unit switch to device Begin*************
'
);
}
}
...
...
@@ -49,7 +50,6 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
})
function
callSetCurFunction
(
caseName
,
iValue
)
{
CheckEmptyUtils
.
sleep
(
3000
)
console
.
info
(
'
usb case param case name:
'
+
caseName
);
console
.
info
(
'
usb case param iValue:
'
+
iValue
);
usb
.
setCurrentFunctions
(
iValue
).
then
(
data
=>
{
...
...
@@ -60,6 +60,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console
.
info
(
'
usb case
'
+
caseName
+
'
error :
'
+
error
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
6000
)
}
/**
...
...
@@ -175,6 +176,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
8000
)
}
console
.
info
(
'
usb SUB_USB_JS_0010 device 2 2: PASS
'
);
...
...
@@ -197,7 +199,6 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
for
(
var
i
=
0
;
i
<
usbPortList
.
length
;
i
++
)
{
console
.
info
(
'
usb case set data role 1, data role 1
'
);
CheckEmptyUtils
.
sleep
(
5000
)
usb
.
setPortRoles
(
usbPortList
[
i
].
id
,
usb
.
SOURCE
,
usb
.
HOST
).
then
(
data
=>
{
expect
(
data
).
assertTrue
();
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
...
...
@@ -205,6 +206,7 @@ describe('UsbPortAndFunctionsJsFunctionsTest', function () {
console
.
info
(
'
usb case setPortRoles error :
'
+
error
);
expect
(
false
).
assertTrue
();
});
CheckEmptyUtils
.
sleep
(
8000
)
}
console
.
info
(
'
usb SUB_USB_JS_0020 host 1 1: PASS
'
);
...
...
usb/usb_standard/src/main/js/test/UsbPortJsunitEx.test.js
浏览文件 @
aebfb78b
...
...
@@ -72,7 +72,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
;
var
powerRole
=
usb
.
SINK
;
var
dataRole
=
usb
.
NONE
-
1
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -81,6 +80,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0030: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0030: PASS
'
);
expect
(
true
).
assertTrue
();
...
...
@@ -95,7 +95,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
;
var
powerRole
=
usb
.
NONE
-
1
;
var
dataRole
=
usb
.
DEVICE
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -104,7 +103,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0040: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0040: PASS
'
);
expect
(
true
).
assertTrue
();
})
...
...
@@ -118,7 +117,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
-
3
;
var
powerRole
=
usb
.
SINK
;
var
dataRole
=
usb
.
NONE
-
1
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -127,7 +125,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0050: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0050: PASS
'
);
expect
(
true
).
assertTrue
();
})
...
...
@@ -141,7 +139,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
;
var
powerRole
=
usb
.
NONE
-
1
;
var
dataRole
=
usb
.
NONE
-
1
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -150,7 +147,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0060: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0060: PASS
'
);
expect
(
true
).
assertTrue
();
})
...
...
@@ -164,8 +161,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
-
1
;
var
dataRole
=
usb
.
NONE
-
1
;
var
powerRole
=
usb
.
NONE
-
1
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -174,7 +169,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0070: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0070: PASS
'
);
expect
(
true
).
assertTrue
();
})
...
...
@@ -188,7 +183,6 @@ describe('UsbPortJsFunctionsTestEx', function () {
var
portId
=
gPort
.
id
-
1
;
var
powerRole
=
1
;
var
dataRole
=
1
;
CheckEmptyUtils
.
sleep
(
2000
)
usb
.
setPortRoles
(
portId
,
powerRole
,
dataRole
).
then
(
data
=>
{
console
.
info
(
'
usb case setPortRoles return:
'
+
data
);
expect
(
data
).
assertTrue
();
...
...
@@ -197,7 +191,7 @@ describe('UsbPortJsFunctionsTestEx', function () {
expect
(
error
).
assertFalse
();
console
.
info
(
'
usb SUB_USB_JS_0080: PASS
'
);
})
CheckEmptyUtils
.
sleep
(
8000
)
console
.
info
(
'
usb SUB_USB_JS_0080: PASS
'
);
expect
(
true
).
assertTrue
();
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录