Fix NPE in Chrome Device (#42813)

This commit is contained in:
Jonah Williams 2019-10-16 15:46:07 -07:00 committed by GitHub
parent fbbc4fa868
commit 01f779e97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class ChromeDevice extends Device {
@override
DeviceLogReader getLogReader({ApplicationPackage app}) {
return NoOpDeviceLogReader(app.name);
return NoOpDeviceLogReader(app?.name);
}
@override

View File

@ -42,6 +42,7 @@ void main() {
expect(chromeDevice.supportsScreenshot, false);
expect(await chromeDevice.isLocalEmulator, false);
expect(chromeDevice.getLogReader(app: mockWebApplicationPackage), isInstanceOf<NoOpDeviceLogReader>());
expect(chromeDevice.getLogReader(), isInstanceOf<NoOpDeviceLogReader>());
expect(await chromeDevice.portForwarder.forward(1), 1);
});