Bug 230363 - Fix TestWebKitAPI.WebKit.AppHighlightsInImageOverlays to work with changing menu states.
Summary: Fix TestWebKitAPI.WebKit.AppHighlightsInImageOverlays to work with changing m...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Megan Gardner
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-09-16 11:01 PDT by Megan Gardner
Modified: 2021-09-16 14:36 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.83 KB, patch)
2021-09-16 11:04 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch (1.82 KB, patch)
2021-09-16 12:23 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff
Patch for landing (1.82 KB, patch)
2021-09-16 12:23 PDT, Megan Gardner
no flags Details | Formatted Diff | Diff

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