Bug 224249

Summary: REGRESSION (r275538): [ macOS ] TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion and TestWebKitAPI.SleepDisabler.Pause consistently failing
Product: WebKit Reporter: Robert Jenner <jenner>
Component: New BugsAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Robert Jenner 2021-04-06 15:10:50 PDT
TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion
TestWebKitAPI.SleepDisabler.Pause

both started failing in macOS. 

HISTORY URL:
https://results.webkit.org/?suite=api-tests&suite=api-tests&test=TestWebKitAPI.SleepDisabler.Pause&test=TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion
Comment 1 Radar WebKit Bug Importer 2021-04-06 15:12:28 PDT
<rdar://problem/76286539>
Comment 2 Robert Jenner 2021-04-06 15:16:01 PDT
Was able to reproduce the failure at ToT using the following test: 

run-api-tests TestWebKitAPI.SleepDisabler.Pause --iterations 10  --child-process=1

The test also failed at r275538, but passed on the revision right before it. 

It appears the r275538 changeset caused the API failures:
https://trac.webkit.org/changeset/275538/webkit
Comment 3 Ryan Haddad 2021-04-06 15:34:13 PDT
    TestWebKitAPI.WebKitLegacy.MediaPlaybackSleepAssertion
        2021-04-06 15:11:37.882 TestWebKitAPI[1488:8689736] nil host used in call to allowsSpecificHTTPSCertificateForHost
        2021-04-06 15:11:37.882 TestWebKitAPI[1488:8689736] nil host used in call to allowsAnyHTTPSCertificateForHost:
        2021-04-06 15:11:37.951 TestWebKitAPI[1488:8689736] *** WARNING: Method convertPointToBase: in class NSView is deprecated on 10.7 and later. It should not be used in new applications. 
        
        /Volumes/Data/worker/bigsur-release/build/Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm:179
        Value of: hasAssertionType(CFSTR("PreventUserIdleDisplaySleep"))
          Actual: false
        Expected: true
        
        
        /Volumes/Data/worker/bigsur-release/build/Tools/TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm:192
        Value of: hasAssertionType(CFSTR("PreventUserIdleSystemSleep"))
          Actual: true
        Expected: false


    TestWebKitAPI.SleepDisabler.Pause
        
        /Volumes/Data/worker/bigsur-release/build/Tools/TestWebKitAPI/Tests/WebKit/SleepDisabler.mm:112
        Expected equality of these values:
          shouldHaveSleepDisabler
            Which is: false
          [webView _hasSleepDisabler]
            Which is: '\x1' (1)
Comment 4 Eric Carlson 2021-04-06 16:44:36 PDT
Created attachment 425336 [details]
Patch
Comment 5 EWS 2021-04-06 17:32:15 PDT
Committed r275574: <https://commits.webkit.org/r275574>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425336 [details].