New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 869550 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
please use my google.com address
Closed: Aug 3
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 866708



Sign in to add a comment

Some misc media tests fail when attempting to change Mojo C++ bindings dispatch scheduling

Project Member Reported by roc...@chromium.org, Jul 31

Issue description

Specifically:

CDM_10/ECKEncryptedMediaTest.MessageTypeTest/0 in browser_tests

and 

MediaRouterMojoImplTest.RegisterAndUnregisterMediaSinksObserver in unit_tests


These break with https://chromium-review.googlesource.com/c/chromium/src/+/1145692 applied, which means something is either wrong with the test expectations or with the code under test.
 
Cc: imch...@chromium.org xhw...@chromium.org
+xhwang and +imcheng for insight into these tests.

The TLDR is that we are changing the way Mojo C++ bindings dispatch messages such that every individual message will run as its own task, instead of a single task being able to dispatch multiple sequential messages in batch. This does not violate any existing guarantees made by the APIs, and it should be a safe change to make. 

Making the change is fairly high priority as it blocks interesting performance work. It's blocked on some test failures, including the ones listed in this bug. Would you be able to help investigate what's going on here?

In every case solved so far the issue has ultimately been a matter of incorrect timing or ordering assumptions being made by production or test code.
Fix / cleanup for MediaRouterMojoImplTest.RegisterAndUnregisterMediaSinksObserver out at https://chromium-review.googlesource.com/c/chromium/src/+/1159271
Thanks for the quick fix!
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec021fcf48e63eaed352ef5085716c5631df73a0

commit ec021fcf48e63eaed352ef5085716c5631df73a0
Author: Derek Cheng <imcheng@chromium.org>
Date: Wed Aug 01 22:01:54 2018

[MediaRouter] Fix / clean up a MediaRouterMojoImplTest.

This patch cleans up how RunLoop is used in the test
MediaRouterMojoImplTest.RegisterAndUnregisterMediaSinksObserver, which
will fail with upcoming Mojo changes.

Tested with https://chromium-review.googlesource.com/c/chromium/src/+/1145692
applied.

Bug:  869550 
Change-Id: I9a7b0d18d3422101a775490863d825df4fd51ec4
Reviewed-on: https://chromium-review.googlesource.com/1159271
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Derek Cheng <imcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579958}
[modify] https://crrev.com/ec021fcf48e63eaed352ef5085716c5631df73a0/chrome/browser/media/router/mojo/media_router_mojo_impl_unittest.cc

Sorry for the delay. Looking at CDM_10/ECKEncryptedMediaTest.MessageTypeTest/0 now.
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/34aa788bb5a7f378f709a9662dab96927710d036

commit 34aa788bb5a7f378f709a9662dab96927710d036
Author: Xiaohan Wang <xhwang@chromium.org>
Date: Fri Aug 03 19:16:11 2018

media: Use associated interface for ContentDecryptionModuleClient

The EME spec requires the order of some events. For example, after
update() [1], we should "run the Update Expiration algorithm on the
session, providing expiration time", then "resolve promise with true".
The former is part of the ContentDecryptionModuleClient interface,
while the latter is a callback on the ContentDecryptionModule interface.
To preserve the order, this CL uses associated interface [2] to ensure
message ordering.

[1] https://w3c.github.io/encrypted-media/#dom-mediakeysession-update
[2] //src/mojo/public/cpp/bindings/README.md#Associated-Interfaces

Bug:  869550 
Test: CDM_10/ECKEncryptedMediaTest.MessageTypeTest/0 working, see Bug
Change-Id: I1afd1657581f83347235357fb26972a6ba657f1c
Reviewed-on: https://chromium-review.googlesource.com/1162309
Reviewed-by: Frank Liberato <liberato@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580620}
[modify] https://crrev.com/34aa788bb5a7f378f709a9662dab96927710d036/media/mojo/clients/mojo_cdm.cc
[modify] https://crrev.com/34aa788bb5a7f378f709a9662dab96927710d036/media/mojo/clients/mojo_cdm.h
[modify] https://crrev.com/34aa788bb5a7f378f709a9662dab96927710d036/media/mojo/interfaces/content_decryption_module.mojom
[modify] https://crrev.com/34aa788bb5a7f378f709a9662dab96927710d036/media/mojo/services/mojo_cdm_service.cc
[modify] https://crrev.com/34aa788bb5a7f378f709a9662dab96927710d036/media/mojo/services/mojo_cdm_service.h

Status: Fixed (was: Assigned)
Thank you both for resolving these failures so quickly! :)

Sign in to add a comment