Bug 203181

Summary: imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https.html is flaky
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, bdakin, commit-queue, megan_gardner, rniwa, thorton, webkit-bot-watchers-bugzilla, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fixes the test
none
Fix GTK/WPE builds
none
Patch for EWS
none
Fix GTK/WPE builds none

Description Aakash Jain 2019-10-19 08:33:54 PDT
The following layout test is flaky on iOS (debug/release) and linux.

imported/w3c/web-platform-tests/clipboard-apis/async-navigator-clipboard-basics.https.html

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=imported%2Fw3c%2Fweb-platform-tests%2Fclipboard-apis%2Fasync-navigator-clipboard-basics.https.html
Comment 1 Aakash Jain 2019-10-19 08:35:29 PDT
This test failed on clean tree (run-layout-tests-without-patch step) in https://ews-build.webkit.org/#/builders/24/builds/2042
Comment 2 Wenson Hsieh 2019-10-20 17:58:21 PDT Comment hidden (obsolete)
Comment 3 Wenson Hsieh 2019-10-21 13:55:05 PDT
Created attachment 381447 [details]
Fix GTK/WPE builds
Comment 4 Ryosuke Niwa 2019-10-21 15:59:20 PDT
Comment on attachment 381447 [details]
Fix GTK/WPE builds

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

Since change count is a Cocoa specific concept, we need to hide that from the platform agnostic code. Perhaps something like PasteboardToken.

> Source/WebCore/Modules/async-clipboard/Clipboard.h:70
> -        int changeCount;
> +        long changeCount;

Can we use uint32_t or uint64_t to be more explicit about the width of this count?
Also, changeCount is cocoa specific concept.
It probably doesn't belong in this platform agnostic class not that we should fix it in this patch.

> Source/WebCore/platform/Pasteboard.h:325
> +    long m_changeCount { 0 };
> +

I don't think this change makes sense. The concept of change count doesn't exist in platforms like Windows.
Comment 5 Wenson Hsieh 2019-10-21 16:03:06 PDT
Comment on attachment 381447 [details]
Fix GTK/WPE builds

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

Thanks for the review!

>> Source/WebCore/Modules/async-clipboard/Clipboard.h:70
>> +        long changeCount;
> 
> Can we use uint32_t or uint64_t to be more explicit about the width of this count?
> Also, changeCount is cocoa specific concept.
> It probably doesn't belong in this platform agnostic class not that we should fix it in this patch.

Good point. This should be a int64_t, to match macOS/iOS — I’ll change it to that.

I’ll also refactor changeCount out of platform-agnostic code in a followup.

>> Source/WebCore/platform/Pasteboard.h:325
>> +
> 
> I don't think this change makes sense. The concept of change count doesn't exist in platforms like Windows.

Okay — I’ll undo this change.
Comment 6 Wenson Hsieh 2019-10-21 19:16:47 PDT Comment hidden (obsolete)
Comment 7 Wenson Hsieh 2019-10-21 19:29:48 PDT
Created attachment 381500 [details]
Fix GTK/WPE builds
Comment 8 WebKit Commit Bot 2019-10-22 00:22:27 PDT
Comment on attachment 381500 [details]
Fix GTK/WPE builds

Clearing flags on attachment: 381500

Committed r251421: <https://trac.webkit.org/changeset/251421>
Comment 9 WebKit Commit Bot 2019-10-22 00:22:28 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-10-22 00:23:13 PDT
<rdar://problem/56491382>