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

Issue 632767 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Android MediaRouter only (left Chro...
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

MediaSessionVisibility browser tests are very hard to modify

Project Member Reported by avayvod@chromium.org, Jul 29 2016

Issue description

I'm trying to add new test cases for when resuming backgrounded videos is allowed and it seems very hard to read and modify the tests.

There's a separate class (test fixture) for every test case with lots of similar protected methods in the base class. Seems like the test fixtures are different to setup the command line differently for each combination of unified pipeline & disable media suspend. Could we just setup the necessary parameters at the beginning of the test case?

TestSessionXWhenY should also be one method with parameters (could we make MediaSession::State public for tests?).

 
Something like this could help (thanks for the suggestion, Mounir!)
https://github.com/google/googletest/blob/master/googletest/docs/AdvancedGuide.md#value-parameterized-tests
Project Member

Comment 2 by bugdroid1@chromium.org, Sep 7 2016

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

commit cc32190deee8678fbc1b1be901cca5e9da9f0297
Author: zqzhang <zqzhang@chromium.org>
Date: Wed Sep 07 15:07:52 2016

Refactoring MediaSessionVisibility browser tests

Using parameterized GTests to run MediaSessionVisibility browser tests
to help make further modification easier.

BUG= 632767 

Review-Url: https://codereview.chromium.org/2299203005
Cr-Commit-Position: refs/heads/master@{#416939}

[modify] https://crrev.com/cc32190deee8678fbc1b1be901cca5e9da9f0297/content/browser/media/session/media_session_visibility_browsertest.cc

Owner: zqzh...@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment