Bug 192409 - webkitpy: Ignore case when comparing device types
Summary: webkitpy: Ignore case when comparing device types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-05 10:26 PST by Jonathan Bedard
Modified: 2018-12-06 15:05 PST (History)
6 users (show)

See Also:


Attachments
Patch (5.05 KB, patch)
2018-12-05 10:30 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (5.05 KB, patch)
2018-12-05 10:58 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (1.68 KB, patch)
2018-12-06 13:35 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2018-12-05 10:26:33 PST
When discussing <https://bugs.webkit.org/show_bug.cgi?id=192161>, which lays the groundwork for <https://bugs.webkit.org/show_bug.cgi?id=192162>, Lucas Forschler pointed out to me that while devices types are always capitalized, platforms are never capitalized. This will no doubt cause confusion when device types are embedded into expected results. To remedy this confusion, we can make the DeviceType class ignore the case of the contained strings when comparing. This means a DeviceType constructed with a lowercase string would match the DeviceType coming from simctl (which will have some letters capitalized)
Comment 1 Radar WebKit Bug Importer 2018-12-05 10:27:05 PST
<rdar://problem/46491558>
Comment 2 Jonathan Bedard 2018-12-05 10:30:45 PST
Created attachment 356617 [details]
Patch
Comment 3 Lucas Forschler 2018-12-05 10:37:50 PST
Comment on attachment 356617 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=356617&action=review

lgtm with typo fix.

> Tools/ChangeLog:10
> +        against DeviceTypes coming form the simulator runtime.

typo: from
Comment 4 Jonathan Bedard 2018-12-05 10:58:08 PST
Created attachment 356620 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2018-12-05 11:46:58 PST
The commit-queue encountered the following flaky tests while processing attachment 356620 [details]:

http/wpt/mediarecorder/MediaRecorder-AV-video-only-dataavailable.html bug 192418 (author: youennf@gmail.com)
The commit-queue is continuing to process your patch.
Comment 6 WebKit Commit Bot 2018-12-05 11:47:04 PST
The commit-queue encountered the following flaky tests while processing attachment 356620 [details]:

webgl/2.0.0/conformance/more/glsl/arrayOutOfBounds.html bug 192419 (author: justin_fan@apple.com)
The commit-queue is continuing to process your patch.
Comment 7 WebKit Commit Bot 2018-12-05 13:02:54 PST
Comment on attachment 356620 [details]
Patch for landing

Clearing flags on attachment: 356620

Committed r238906: <https://trac.webkit.org/changeset/238906>
Comment 8 WebKit Commit Bot 2018-12-05 13:02:55 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Darin Adler 2018-12-06 12:41:28 PST
Comment on attachment 356620 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=356620&action=review

> Tools/Scripts/webkitpy/xcode/device_type_unittest.py:147
> +    def test_comparsion_lower_case(self):

Typo here: "comparsion"
Comment 10 Jonathan Bedard 2018-12-06 13:35:45 PST
Reopening to attach new patch.
Comment 11 Jonathan Bedard 2018-12-06 13:35:46 PST
Created attachment 356748 [details]
Patch for landing
Comment 12 Jonathan Bedard 2018-12-06 13:36:40 PST
(In reply to Darin Adler from comment #9)
> Comment on attachment 356620 [details]
> Patch for landing
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=356620&action=review
> 
> > Tools/Scripts/webkitpy/xcode/device_type_unittest.py:147
> > +    def test_comparsion_lower_case(self):
> 
> Typo here: "comparsion"

Oops, thanks Darin, landing a fix for the typo.
Comment 13 WebKit Commit Bot 2018-12-06 14:24:59 PST
The commit-queue encountered the following flaky tests while processing attachment 356748 [details]:

inspector/canvas/recording-bitmaprenderer.html bug 192475 (author: drousso@apple.com)
The commit-queue is continuing to process your patch.
Comment 14 WebKit Commit Bot 2018-12-06 14:25:05 PST
The commit-queue encountered the following flaky tests while processing attachment 356748 [details]:

imported/w3c/web-platform-tests/encoding/legacy-mb-japanese/shift_jis/sjis-encode-href-errors-hangul.html bug 192476 (author: mjs@apple.com)
The commit-queue is continuing to process your patch.
Comment 15 WebKit Commit Bot 2018-12-06 14:50:58 PST
The commit-queue encountered the following flaky tests while processing attachment 356748 [details]:

http/wpt/css/css-animations/start-animation-001.html bug 190903 (authors: dino@apple.com, fred.wang@free.fr, and graouts@apple.com)
The commit-queue is continuing to process your patch.
Comment 16 WebKit Commit Bot 2018-12-06 14:51:18 PST
The commit-queue encountered the following flaky tests while processing attachment 356748 [details]:

webgl/1.0.2/conformance/more/conformance/methods.html bug 192477 (author: roger_fong@apple.com)
workers/bomb.html bug 192050 (author: fpizlo@apple.com)
The commit-queue is continuing to process your patch.
Comment 17 WebKit Commit Bot 2018-12-06 15:05:45 PST
Comment on attachment 356748 [details]
Patch for landing

Clearing flags on attachment: 356748

Committed r238943: <https://trac.webkit.org/changeset/238943>
Comment 18 WebKit Commit Bot 2018-12-06 15:05:46 PST
All reviewed patches have been landed.  Closing bug.