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

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

Issue 2871583004: Rename --enable-default-media-session to --enable-audio-focus. (Closed)
Patch Set: Created 3 years, 7 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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/browser/media/session/media_session_impl.h" 6 #include "content/browser/media/session/media_session_impl.h"
7 #include "content/browser/media/session/mock_media_session_player_observer.h" 7 #include "content/browser/media/session/mock_media_session_player_observer.h"
8 #include "content/public/test/content_browser_test.h" 8 #include "content/public/test/content_browser_test.h"
9 #include "content/shell/browser/shell.h" 9 #include "content/shell/browser/shell.h"
10 #include "media/base/media_content_type.h" 10 #include "media/base/media_content_type.h"
11 #include "media/base/media_switches.h" 11 #include "media/base/media_switches.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 class AudioFocusDelegateDefaultBrowserTest : public ContentBrowserTest { 15 class AudioFocusDelegateDefaultBrowserTest : public ContentBrowserTest {
16 protected: 16 protected:
17 void SetUpCommandLine(base::CommandLine* command_line) override { 17 void SetUpCommandLine(base::CommandLine* command_line) override {
18 command_line->AppendSwitch(switches::kEnableDefaultMediaSession); 18 command_line->AppendSwitch(switches::kEnableAudioFocus);
19 } 19 }
20 20
21 void Run(WebContents* start_contents, WebContents* interrupt_contents) { 21 void Run(WebContents* start_contents, WebContents* interrupt_contents) {
22 std::unique_ptr<MockMediaSessionPlayerObserver> 22 std::unique_ptr<MockMediaSessionPlayerObserver>
23 player_observer(new MockMediaSessionPlayerObserver); 23 player_observer(new MockMediaSessionPlayerObserver);
24 24
25 MediaSessionImpl* media_session = MediaSessionImpl::Get(start_contents); 25 MediaSessionImpl* media_session = MediaSessionImpl::Get(start_contents);
26 ASSERT_TRUE(media_session); 26 ASSERT_TRUE(media_session);
27 27
28 MediaSessionImpl* other_media_session = 28 MediaSessionImpl* other_media_session =
(...skipping 29 matching lines...) Expand all
58 Run(shell()->web_contents(), CreateOffTheRecordBrowser()->web_contents()); 58 Run(shell()->web_contents(), CreateOffTheRecordBrowser()->web_contents());
59 } 59 }
60 60
61 // OffTheRecord BrowserContext is interrupted by regular one. 61 // OffTheRecord BrowserContext is interrupted by regular one.
62 IN_PROC_BROWSER_TEST_F(AudioFocusDelegateDefaultBrowserTest, 62 IN_PROC_BROWSER_TEST_F(AudioFocusDelegateDefaultBrowserTest,
63 OffTheRecordInterruptsRegular) { 63 OffTheRecordInterruptsRegular) {
64 Run(CreateOffTheRecordBrowser()->web_contents(), shell()->web_contents()); 64 Run(CreateOffTheRecordBrowser()->web_contents(), shell()->web_contents());
65 } 65 }
66 66
67 } // namespace content 67 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698