Index: content/browser/media/session/media_session_impl_visibility_browsertest.cc |
diff --git a/content/browser/media/session/media_session_impl_visibility_browsertest.cc b/content/browser/media/session/media_session_impl_visibility_browsertest.cc |
index a5ad0b02355f8a76b1e74939e046ddf11099b063..718fd5379218d45d6acd63809f8fb76f26431532 100644 |
--- a/content/browser/media/session/media_session_impl_visibility_browsertest.cc |
+++ b/content/browser/media/session/media_session_impl_visibility_browsertest.cc |
@@ -96,6 +96,13 @@ class MediaSessionImplVisibilityBrowserTest |
scoped_feature_list_.InitAndDisableFeature(media::kResumeBackgroundVideo); |
} |
+ void SetUp() override { |
+ VisibilityTestData params = GetVisibilityTestData(); |
+ EnableDisableResumingBackgroundVideos(params.background_resuming == |
+ BackgroundResuming::ENABLED); |
+ ContentBrowserTest::SetUp(); |
+ } |
+ |
void SetUpCommandLine(base::CommandLine* command_line) override { |
command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests); |
#if !defined(OS_ANDROID) |
@@ -108,14 +115,6 @@ class MediaSessionImplVisibilityBrowserTest |
command_line->AppendSwitch(switches::kEnableMediaSuspend); |
else |
command_line->AppendSwitch(switches::kDisableMediaSuspend); |
- |
- if (params.background_resuming == BackgroundResuming::ENABLED) { |
- command_line->AppendSwitchASCII(switches::kEnableFeatures, |
- media::kResumeBackgroundVideo.name); |
- } else { |
- command_line->AppendSwitchASCII(switches::kDisableFeatures, |
- media::kResumeBackgroundVideo.name); |
- } |
} |
const VisibilityTestData& GetVisibilityTestData() { |