webkitpy: Expose device_type from host-like objects
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 22:02:18 +0000 (22:02 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 22:02:18 +0000 (22:02 +0000)
commit6fa793a6b32be2aa13615df17faa3ba386b2df27
tree83f320d820f0c61319cab99adf5a23c33f94a906
parent109bb93a6c1c27d044ca15e183961e9d06587585
webkitpy: Expose device_type from host-like objects
https://bugs.webkit.org/show_bug.cgi?id=193406
<rdar://problem/47262305>

Reviewed by Lucas Forschler.

Devices should expose device_type. As a result, all host objects should
provide a device_type property, even if they do not yet define a device_type.

* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost):
(SystemHost.device_type):
* Scripts/webkitpy/common/system/systemhost_mock.py:
(MockSystemHost):
(MockSystemHost.device_type):
* Scripts/webkitpy/port/device.py:
(Device):
(Device.device_type):
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager._find_exisiting_device_for_request):
(SimulatedDeviceManager._disambiguate_device_type):
(SimulatedDeviceManager._does_fulfill_request):
(SimulatedDeviceManager.device_count_for_type):
(SimulatedDeviceManager.initialize_devices):
* Scripts/webkitpy/xcode/simulated_device_unittest.py:
(test_available_devices):
(test_swapping_devices):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/common/system/systemhost.py
Tools/Scripts/webkitpy/common/system/systemhost_mock.py
Tools/Scripts/webkitpy/port/device.py
Tools/Scripts/webkitpy/xcode/simulated_device.py
Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py