提交 d0596ee4 编写于 作者: L lixiaofeng_154b

适配用例

Signed-off-by: Nlixiaofeng_154b <lixiaofeng54@huawei.com>
Change-Id: I6590670f772f41e471d1e358f467544086206cd4
上级 b5ead519
......@@ -32,6 +32,10 @@ describe('UsbCoreJsFunctionsTest', function () {
console.info('begin test getversion :' + Version)
// version > 17 host currentMode = 2 device currentMode = 1
var usbPortList = usb.getPorts()
if (usbPortList == undefined) {
portCurrentMode = 1;
return
}
gDeviceList = usb.getDevices();
if (usbPortList.length > 0) {
console.info('usb case gDeviceList.length return: ' + gDeviceList.length);
......
......@@ -32,6 +32,10 @@ describe('UsbCoreJsFunctionsTestEx', function () {
console.info('begin test getversion :' + Version)
// version > 17 host currentMode = 2 device currentMode = 1
var usbPortList = usb.getPorts()
if (usbPortList == undefined) {
portCurrentMode = 1;
return
}
gDeviceList = usb.getDevices();
if (usbPortList.length > 0) {
if (gDeviceList.length > 0) {
......
......@@ -33,6 +33,10 @@ describe('UsbDevicePipeJsFunctionsTest', function () {
console.info('usb unit begin test getversion :' + Version)
// version > 17 host currentMode = 2 device currentMode = 1
var usbPortList = usb.getPorts()
if (usbPortList == undefined) {
portCurrentMode = 1;
return
}
gDeviceList = usb.getDevices();
if (usbPortList.length > 0) {
if (gDeviceList.length > 0) {
......
......@@ -33,6 +33,10 @@ describe('UsbDevicePipeJsFunctionsTestEx', function () {
// version > 17 host currentMode = 2 device currentMode = 1
var usbPortList = usb.getPorts()
if (usbPortList == undefined) {
portCurrentMode = 1;
return
}
gDeviceList = usb.getDevices();
if (usbPortList.length > 0) {
if (gDeviceList.length > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册