Bug 180928 - [EME] Add layout test for clearKey CENC message event
Summary: [EME] Add layout test for clearKey CENC message event
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 180081
Blocks:
  Show dependency treegraph
 
Reported: 2017-12-18 02:40 PST by Yacine Bandou
Modified: 2018-01-09 08:51 PST (History)
9 users (show)

See Also:


Attachments
Patch (15.02 KB, patch)
2017-12-18 06:35 PST, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (16.85 KB, patch)
2017-12-20 08:28 PST, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (16.80 KB, patch)
2018-01-09 03:01 PST, Yacine Bandou
no flags Details | Formatted Diff | Diff
Patch (15.95 KB, patch)
2018-01-09 06:22 PST, Yacine Bandou
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yacine Bandou 2017-12-18 02:40:28 PST
This layout test tests the contents of the clearKey message event and checks its KID.
Comment 1 Yacine Bandou 2017-12-18 06:35:59 PST
Created attachment 329651 [details]
Patch
Comment 2 Xabier Rodríguez Calvar 2017-12-19 01:21:01 PST
Comment on attachment 329651 [details]
Patch

The test looks mainly ok and it does not deserve an r- but I think we can improve it, specially thinking of the future, if any.

I see two things. First, I'd prefer to use const and let instead of var.

Second, this cenc message test should be enough already, but I am not going to complain only for one test. If you're planning to file more dual tests like this that are mostly the same (almost everything but the video and test initialization is the same) we should think of a common way of running these tests. My suggestion would be merging both tests at least to share the biggest part of the code and maybe thinking of a way of writing a small utility to run the same code through MSE and non-MSE paths if only initialization is different).
Comment 3 Yacine Bandou 2017-12-20 08:28:05 PST
Created attachment 329922 [details]
Patch
Comment 4 Yacine Bandou 2018-01-09 03:01:26 PST
Created attachment 330805 [details]
Patch
Comment 5 Xabier Rodríguez Calvar 2018-01-09 03:36:06 PST
Comment on attachment 330805 [details]
Patch

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

Most important part is removing the [ Pass ] from the WPE expectations.

Now, I'd encourage you to use more const and let instead of var. I see you have converted many var into let but some of them can be const and there are some var left.

> LayoutTests/platform/wpe/TestExpectations:1003
> +media/encrypted-media/clearKey/clearKey-message-cenc-event.html [ Pass ]
> +media/encrypted-media/clearKey/clearKey-message-cenc-event-mse.html [ Pass ]
> +

This is not needed since we are not skipping globally.
Comment 6 Yacine Bandou 2018-01-09 06:22:28 PST
Created attachment 330818 [details]
Patch
Comment 7 WebKit Commit Bot 2018-01-09 08:50:22 PST
Comment on attachment 330818 [details]
Patch

Clearing flags on attachment: 330818

Committed r226639: <https://trac.webkit.org/changeset/226639>
Comment 8 WebKit Commit Bot 2018-01-09 08:50:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Radar WebKit Bug Importer 2018-01-09 08:51:21 PST
<rdar://problem/36376406>