Bug 212540 - [EME] navigator.requestMediaKeySystemAccess() should reject PUR sessionTypes in private browsing mode.
Summary: [EME] navigator.requestMediaKeySystemAccess() should reject PUR sessionTypes ...
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: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-29 13:44 PDT by Jer Noble
Modified: 2020-05-29 16:16 PDT (History)
8 users (show)

See Also:


Attachments
Patch (4.97 KB, patch)
2020-05-29 13:47 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (4.95 KB, patch)
2020-05-29 13:48 PDT, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2020-05-29 13:44:14 PDT
[EME] navigator.requestMediaKeySystemAccess() should reject PUR sessionTypes in private browsing mode.
Comment 1 Jer Noble 2020-05-29 13:45:00 PDT
<rdar://problem/61125757>
Comment 2 Jer Noble 2020-05-29 13:47:51 PDT
Created attachment 400608 [details]
Patch
Comment 3 Jer Noble 2020-05-29 13:48:41 PDT
Created attachment 400609 [details]
Patch
Comment 4 Peng Liu 2020-05-29 14:09:54 PDT
Comment on attachment 400609 [details]
Patch

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

> LayoutTests/platform/mac/media/encrypted-media/fps-ephemeral-requestMediaKeySystemAccess.html:19
> +            consoleWrite('This test must be run in private browsing mode.')

This log message is not so clear. The browser will be in private browsing mode if window.internals is not empty? Also, do we need to exit the test if the browser is not in the private browsing mode?
Comment 5 Jer Noble 2020-05-29 14:14:04 PDT
(In reply to Peng Liu from comment #4)
> Comment on attachment 400609 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=400609&action=review
> 
> > LayoutTests/platform/mac/media/encrypted-media/fps-ephemeral-requestMediaKeySystemAccess.html:19
> > +            consoleWrite('This test must be run in private browsing mode.')
> 
> This log message is not so clear. The browser will be in private browsing
> mode if window.internals is not empty? Also, do we need to exit the test if
> the browser is not in the private browsing mode?

This line will only be printed I window.internals is empty, or in other words, if someone loads this test directly in a web browser. The test will fail unless the page is loaded in private browsing mode.
Comment 6 Jer Noble 2020-05-29 16:08:50 PDT
Test failures are due to r262311, fixed in r262318. Landing.
Comment 7 EWS 2020-05-29 16:16:19 PDT
Committed r262324: <https://trac.webkit.org/changeset/262324>

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