Bug 215290

Summary: [macOS] It should be possible to override spellchecking results in WebKitTestRunner
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, hi, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
hi: review+
Patch for landing none

Description Wenson Hsieh 2020-08-07 13:28:10 PDT
SSIA
Comment 1 Wenson Hsieh 2020-08-07 13:43:58 PDT
Created attachment 406207 [details]
Patch
Comment 2 Devin Rousso 2020-08-07 15:22:17 PDT
Comment on attachment 406207 [details]
Patch

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

r=me

> LayoutTests/editing/spelling/markers.html:83
> +    element = e;

NIT: rather than declare the globals using `let`, I think you can use `window.element = null` and then just set `window.element = element` (changing `e` to `element`) here to avoid the naming collision/confusion :)

> LayoutTests/editing/spelling/markers.html:92
> +        misspellingData = misspelling;

ditto (:83)

> LayoutTests/editing/spelling/markers.html:109
> +    element = e;

ditto (:83)

> LayoutTests/editing/spelling/markers.html:118
> +        misspellingData = misspelling;

ditto (:83)

> LayoutTests/editing/spelling/markers.html:123
> +            oppositeMarker = "spelling";

ditto (:83)

> LayoutTests/editing/spelling/markers.html:125
> +            oppositeMarker = "grammar";

ditto (:83)
Comment 3 Wenson Hsieh 2020-08-07 15:25:44 PDT
Comment on attachment 406207 [details]
Patch

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

>> LayoutTests/editing/spelling/markers.html:83
>> +    element = e;
> 
> NIT: rather than declare the globals using `let`, I think you can use `window.element = null` and then just set `window.element = element` (changing `e` to `element`) here to avoid the naming collision/confusion :)

Sounds good!

>> LayoutTests/editing/spelling/markers.html:92
>> +        misspellingData = misspelling;
> 
> ditto (:83)

👍🏻

>> LayoutTests/editing/spelling/markers.html:109
>> +    element = e;
> 
> ditto (:83)

👍🏻

>> LayoutTests/editing/spelling/markers.html:118
>> +        misspellingData = misspelling;
> 
> ditto (:83)

👍🏻

>> LayoutTests/editing/spelling/markers.html:123
>> +            oppositeMarker = "spelling";
> 
> ditto (:83)

👍🏻

>> LayoutTests/editing/spelling/markers.html:125
>> +            oppositeMarker = "grammar";
> 
> ditto (:83)

👍🏻
Comment 4 Wenson Hsieh 2020-08-07 15:30:58 PDT
Created attachment 406219 [details]
Patch for landing
Comment 5 EWS 2020-08-07 16:05:42 PDT
Committed r265396: <https://trac.webkit.org/changeset/265396>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 406219 [details].
Comment 6 Radar WebKit Bug Importer 2020-08-07 16:06:34 PDT
<rdar://problem/66704754>