Bug 229323 - Make UIEventAttribution tests less platform dependent
Summary: Make UIEventAttribution tests less platform dependent
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: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-19 23:08 PDT by Alex Christensen
Modified: 2021-08-20 16:03 PDT (History)
2 users (show)

See Also:


Attachments
Patch (11.24 KB, patch)
2021-08-19 23:09 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (15.86 KB, patch)
2021-08-20 15:15 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-08-19 23:08:09 PDT
Make UIEventAttribution tests less platform dependent
Comment 1 Alex Christensen 2021-08-19 23:09:00 PDT
Created attachment 435943 [details]
Patch
Comment 2 John Wilander 2021-08-20 08:48:51 PDT
TestWebKitAPI.EventAttribution.Basic is timing out on iOS.
Comment 3 John Wilander 2021-08-20 08:53:20 PDT
Comment on attachment 435943 [details]
Patch

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

r=me as long as the broken iOS test is fixed.

> Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:58
> +- (void)_addEventAttributionWithSourceID:(uint8_t)sourceID destinationURL:(NSURL *)destination sourceDescription:(NSString *)sourceDescription purchaser:(NSString *)purchaser reportEndpoint:(NSURL *)reportEndpoint nonce:(NSString *)nonce

Should we call the nonce parameter optionalNonce?

> Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:265
> +    [webView _addEventAttributionWithSourceID:42 destinationURL:exampleURL() sourceDescription:@"test source description" purchaser:@"test purchaser" reportEndpoint:serverURL nonce:@"ABCDEFabcdef0123456789"];

Where did 42 come from? Did it come from MockEventAttribution before?
Comment 4 Alex Christensen 2021-08-20 13:41:54 PDT
This test seems to have been timing out since r277447, which was refactored significantly in r279514
Comment 5 Alex Christensen 2021-08-20 15:15:45 PDT
Created attachment 436034 [details]
Patch
Comment 6 Alex Christensen 2021-08-20 15:50:29 PDT
Comment on attachment 436034 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm:129
> +#if HAVE(UI_EVENT_ATTRIBUTION)

I verified on Monterey that this is not needed.  The test is no longer dependent on UIEventAttribution.
Comment 7 Alex Christensen 2021-08-20 16:02:12 PDT
http://trac.webkit.org/r281349
Comment 8 Radar WebKit Bug Importer 2021-08-20 16:03:36 PDT
<rdar://problem/82189489>