mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 06:54:03 +02:00
Add browser list to device identity.
This commit is contained in:
@@ -293,6 +293,21 @@ module.exports = syrup.serial()
|
||||
})
|
||||
}
|
||||
|
||||
function getBrowsers() {
|
||||
return runServiceCommand(
|
||||
apk.serviceProto.RequestType.GET_BROWSERS
|
||||
, new apk.serviceProto.GetBrowsersRequest()
|
||||
)
|
||||
.then(function(data) {
|
||||
var response = apk.serviceProto.GetBrowsersResponse.decode(data)
|
||||
if (response.success) {
|
||||
delete response.success
|
||||
return response
|
||||
}
|
||||
throw new Error('Unable to get browser list')
|
||||
})
|
||||
}
|
||||
|
||||
function runServiceCommand(type, cmd) {
|
||||
var resolver = Promise.defer()
|
||||
service.writer.write(new apk.serviceProto.RequestEnvelope(
|
||||
@@ -361,6 +376,7 @@ module.exports = syrup.serial()
|
||||
})
|
||||
}
|
||||
, copy: getClipboard
|
||||
, getBrowsers: getBrowsers
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user