Bug 215290 - [macOS] It should be possible to override spellchecking results in WebKitTestRunner
Summary: [macOS] It should be possible to override spellchecking results in WebKitTest...
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: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-07 13:28 PDT by Wenson Hsieh
Modified: 2020-08-07 16:06 PDT (History)
5 users (show)

See Also:


Attachments
Patch (30.34 KB, patch)
2020-08-07 13:43 PDT, Wenson Hsieh
hi: review+
Details | Formatted Diff | Diff
Patch for landing (30.42 KB, patch)
2020-08-07 15:30 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>