WebKit Bugzilla
Attachment 356743 Details for
Bug 192472
: webkitpy: Create device given lower-case DeviceType
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192472-20181206130315.patch (text/plain), 3.00 KB, created by
Jonathan Bedard
on 2018-12-06 13:03:16 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Jonathan Bedard
Created:
2018-12-06 13:03:16 PST
Size:
3.00 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 238938) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2018-12-06 Jonathan Bedard <jbedard@apple.com> >+ >+ webkitpy: Create device given lower-case DeviceType >+ <https://bugs.webkit.org/show_bug.cgi?id=192472> >+ <rdar://problem/46532650> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitpy/xcode/simulated_device.py: >+ (SimulatedDeviceManager._get_device_identifier_for_type): Comparing simctl device identifiers with DeviceTypes >+ should be letter-case agnostic. >+ * Scripts/webkitpy/xcode/simulated_device_unittest.py: >+ (test_lower_case_device_type): >+ > 2018-12-05 Wenson Hsieh <wenson_hsieh@apple.com> > > [Cocoa] Share ClassMethodSwizzler and InstanceMethodSwizzler between TestWebKitAPI and WebKitTestRunner >Index: Tools/Scripts/webkitpy/xcode/simulated_device.py >=================================================================== >--- Tools/Scripts/webkitpy/xcode/simulated_device.py (revision 238938) >+++ Tools/Scripts/webkitpy/xcode/simulated_device.py (working copy) >@@ -229,7 +229,7 @@ class SimulatedDeviceManager(object): > @staticmethod > def _get_device_identifier_for_type(device_type): > for type_id, type_name in SimulatedDeviceManager._device_identifier_to_name.iteritems(): >- if type_name == '{} {}'.format(device_type.hardware_family, device_type.hardware_type): >+ if type_name.lower() == '{} {}'.format(device_type.hardware_family.lower(), device_type.hardware_type.lower()): > return type_id > return None > >Index: Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py >=================================================================== >--- Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py (revision 238938) >+++ Tools/Scripts/webkitpy/xcode/simulated_device_unittest.py (working copy) >@@ -610,6 +610,20 @@ class SimulatedDeviceTest(unittest.TestC > SimulatedDeviceManager.tear_down(host) > self.assertIsNone(SimulatedDeviceManager.INITIALIZED_DEVICES) > >+ def test_lower_case_device_type(self): >+ SimulatedDeviceTest.reset_simulated_device_manager() >+ host = SimulatedDeviceTest.mock_host_for_simctl() >+ SimulatedDeviceManager.available_devices(host) >+ >+ SimulatedDeviceManager.initialize_devices(DeviceRequest(DeviceType.from_string('iphone 5s', Version(11))), host=host) >+ >+ self.assertEquals(1, len(SimulatedDeviceManager.INITIALIZED_DEVICES)) >+ self.assertEquals('34FB476C-6FA0-43C8-8945-1BD7A4EBF0DE', SimulatedDeviceManager.INITIALIZED_DEVICES[0].udid) >+ self.assertEquals(SimulatedDevice.DeviceState.BOOTED, SimulatedDeviceManager.INITIALIZED_DEVICES[0].platform_device.state()) >+ >+ SimulatedDeviceManager.tear_down(host) >+ self.assertIsNone(SimulatedDeviceManager.INITIALIZED_DEVICES) >+ > @staticmethod > def change_state_to(device, state): > assert isinstance(state, int)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192472
: 356743