Bug 230363

Summary: Fix TestWebKitAPI.WebKit.AppHighlightsInImageOverlays to work with changing menu states.
Product: WebKit Reporter: Megan Gardner <megan_gardner>
Component: New BugsAssignee: Megan Gardner <megan_gardner>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Megan Gardner 2021-09-16 11:01:23 PDT
Fix TestWebKitAPI.WebKit.AppHighlightsInImageOverlays to work with changing menu states.
Comment 1 Megan Gardner 2021-09-16 11:04:21 PDT
Created attachment 438370 [details]
Patch
Comment 2 Wenson Hsieh 2021-09-16 11:05:16 PDT
Comment on attachment 438370 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WKContentViewEditingActions.mm:101
> +    EXPECT_EQ([contentView targetForAction:createHighlightForCurrentQuickNoteWithRangeSelector withSender:nil], nil);

Maybe `EXPECT_NULL` to match the ones above? But this works too.
Comment 3 Megan Gardner 2021-09-16 12:23:07 PDT
Created attachment 438383 [details]
Patch
Comment 4 Megan Gardner 2021-09-16 12:23:30 PDT
Created attachment 438384 [details]
Patch for landing
Comment 5 Darin Adler 2021-09-16 12:31:19 PDT
Comment on attachment 438383 [details]
Patch

Not new to this patch, in fact this patch makes things better, but: I think a lot of our tests are using the EXPECT family backwards. It’s expected value first, then test expression. This affects the output when tests fail, and is worth getting right.
Comment 6 Wenson Hsieh 2021-09-16 12:35:25 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 438383 [details]
> Patch
> 
> Not new to this patch, in fact this patch makes things better, but: I think
> a lot of our tests are using the EXPECT family backwards. It’s expected
> value first, then test expression. This affects the output when tests fail,
> and is worth getting right.

Good catch! Filed: <https://bugs.webkit.org/show_bug.cgi?id=230368>.
Comment 7 EWS 2021-09-16 14:35:30 PDT
Committed r282601 (241762@main): <https://commits.webkit.org/241762@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438384 [details].
Comment 8 Radar WebKit Bug Importer 2021-09-16 14:36:34 PDT
<rdar://problem/83213601>