Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: content/browser/media/session/media_session_impl_visibility_browsertest.cc

Issue 2738793002: Revert of Disable pausing background video-only players on desktop. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <tuple> 5 #include <tuple>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 }; 244 };
245 245
246 namespace { 246 namespace {
247 247
248 VisibilityTestData kTestParams[] = { 248 VisibilityTestData kTestParams[] = {
249 {MediaSuspend::ENABLED, BackgroundResuming::DISABLED, 249 {MediaSuspend::ENABLED, BackgroundResuming::DISABLED,
250 SessionState::SUSPENDED, SessionState::INACTIVE}, 250 SessionState::SUSPENDED, SessionState::INACTIVE},
251 {MediaSuspend::ENABLED, BackgroundResuming::DISABLED, SessionState::ACTIVE, 251 {MediaSuspend::ENABLED, BackgroundResuming::DISABLED, SessionState::ACTIVE,
252 SessionState::INACTIVE}, 252 SessionState::INACTIVE},
253 {MediaSuspend::ENABLED, BackgroundResuming::ENABLED, SessionState::ACTIVE, 253 {MediaSuspend::ENABLED, BackgroundResuming::ENABLED, SessionState::ACTIVE,
254 // TODO(avayvod): Revert after merge to 58. See https://crbug.com/699106.
255 #if defined(OS_ANDROID)
256 SessionState::SUSPENDED}, 254 SessionState::SUSPENDED},
257 #else
258 SessionState::ACTIVE},
259 #endif
260 {MediaSuspend::ENABLED, BackgroundResuming::ENABLED, 255 {MediaSuspend::ENABLED, BackgroundResuming::ENABLED,
261 SessionState::SUSPENDED, SessionState::SUSPENDED}, 256 SessionState::SUSPENDED, SessionState::SUSPENDED},
262 {MediaSuspend::DISABLED, BackgroundResuming::DISABLED, 257 {MediaSuspend::DISABLED, BackgroundResuming::DISABLED,
263 SessionState::SUSPENDED, SessionState::SUSPENDED}, 258 SessionState::SUSPENDED, SessionState::SUSPENDED},
264 {MediaSuspend::DISABLED, BackgroundResuming::DISABLED, SessionState::ACTIVE, 259 {MediaSuspend::DISABLED, BackgroundResuming::DISABLED, SessionState::ACTIVE,
265 SessionState::ACTIVE}, 260 SessionState::ACTIVE},
266 {MediaSuspend::DISABLED, BackgroundResuming::ENABLED, SessionState::ACTIVE, 261 {MediaSuspend::DISABLED, BackgroundResuming::ENABLED, SessionState::ACTIVE,
267 SessionState::ACTIVE}, 262 SessionState::ACTIVE},
268 {MediaSuspend::DISABLED, BackgroundResuming::ENABLED, 263 {MediaSuspend::DISABLED, BackgroundResuming::ENABLED,
269 SessionState::SUSPENDED, SessionState::SUSPENDED}, 264 SessionState::SUSPENDED, SessionState::SUSPENDED},
270 }; 265 };
271 266
272 } // anonymous namespace 267 } // anonymous namespace
273 268
274 IN_PROC_BROWSER_TEST_P(MediaSessionImplVisibilityBrowserTest, TestEntryPoint) { 269 IN_PROC_BROWSER_TEST_P(MediaSessionImplVisibilityBrowserTest, TestEntryPoint) {
275 StartPlayer(); 270 StartPlayer();
276 MaybePausePlayer(); 271 MaybePausePlayer();
277 HideTab(); 272 HideTab();
278 CheckSessionStateAfterHide(); 273 CheckSessionStateAfterHide();
279 } 274 }
280 275
281 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances, 276 INSTANTIATE_TEST_CASE_P(MediaSessionImplVisibilityBrowserTestInstances,
282 MediaSessionImplVisibilityBrowserTest, 277 MediaSessionImplVisibilityBrowserTest,
283 ::testing::ValuesIn(kTestParams)); 278 ::testing::ValuesIn(kTestParams));
284 279
285 } // namespace content 280 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698