Changeset 240953 in webkit


Ignore:
Timestamp:
Feb 4, 2019 5:16:28 PM (5 years ago)
Author:
Jonathan Bedard
Message:

webkitpy: Precedence of booted devices should match precedence in DEFAULT_DEVICE_TYPES
https://bugs.webkit.org/show_bug.cgi?id=194158
<rdar://problem/47737268>

Rubber-stamped by Aakash Jain.

  • Scripts/webkitpy/port/device_port.py:

(DevicePort.supported_device_types): Sort supported device types by the DEFAULT_DEVICE_TYPES.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240949 r240953  
     12019-02-04  Jonathan Bedard  <jbedard@apple.com>
     2
     3        webkitpy: Precedence of booted devices should match precedence in DEFAULT_DEVICE_TYPES
     4        https://bugs.webkit.org/show_bug.cgi?id=194158
     5        <rdar://problem/47737268>
     6
     7        Rubber-stamped by Aakash Jain.
     8
     9        * Scripts/webkitpy/port/device_port.py:
     10        (DevicePort.supported_device_types): Sort supported device types by the DEFAULT_DEVICE_TYPES.
     11
    1122019-02-04  Said Abou-Hallawa  <said@apple.com>
    213
  • trunk/Tools/Scripts/webkitpy/port/device_port.py

    r240150 r240953  
    145145                types.add(device.device_type)
    146146        if types:
    147             return list(types)
     147
     148            def sorted_by_default_device_type(type):
     149                try:
     150                    return self.DEFAULT_DEVICE_TYPES.index(type)
     151                except ValueError:
     152                    return len(self.DEFAULT_DEVICE_TYPES)
     153
     154            return sorted(types, key=sorted_by_default_device_type)
     155
    148156        return self.DEFAULT_DEVICE_TYPES or [self.DEVICE_TYPE]
    149157
Note: See TracChangeset for help on using the changeset viewer.