Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_INTEGRATION_BROWSER_TEST_BAS E_H_ | |
| 6 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_INTEGRATION_BROWSER_TEST_BAS E_H_ | |
| 7 | |
| 8 #include "content/public/test/content_browser_test.h" | |
| 9 namespace base { | |
|
mlamouri (slow - plz ping)
2016/03/23 15:10:16
style: I believe you are missing a line between th
Zhiqiang Zhang (Slow)
2016/03/24 18:16:49
Done.
| |
| 10 class CommandLine; | |
| 11 class TimeDelta; | |
| 12 } | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 class WebContents; | |
| 17 class MediaSession; | |
| 18 | |
| 19 class MediaSessionIntegrationBrowserTestBase | |
|
mlamouri (slow - plz ping)
2016/03/23 15:10:16
nit: I would call this MediaSessionVisibilityBrows
Zhiqiang Zhang (Slow)
2016/03/24 18:16:49
Done.
| |
| 20 : public ContentBrowserTest { | |
| 21 public: | |
| 22 MediaSessionIntegrationBrowserTestBase() = default; | |
| 23 | |
| 24 void SetUpOnMainThread() override; | |
| 25 | |
| 26 void SetUpCommandLine(base::CommandLine* command_line) override; | |
| 27 | |
| 28 void LoadTestPage(); | |
| 29 | |
| 30 void RunScript(std::string script); | |
| 31 | |
| 32 // TODO(zqzhang): This method is shared with | |
| 33 // MediaIntegrationTests. Move it into a general place. | |
| 34 bool ConditionalWait(base::TimeDelta timeout, | |
| 35 base::TimeDelta interval, | |
| 36 const base::Callback<bool(void)>& callback); | |
| 37 | |
| 38 bool IsMediaSessionActive(); | |
| 39 bool IsMediaSessionSuspended(); | |
| 40 bool IsMediaSessionInactive(); | |
| 41 | |
| 42 protected: | |
| 43 void TestSessionInactiveWhenHiddenAfterContentPause(); | |
| 44 void TestSessionInactiveWhenHiddenWhilePlaying(); | |
| 45 | |
| 46 WebContents* web_contents_; | |
| 47 MediaSession* media_session_; | |
| 48 }; | |
| 49 | |
| 50 } // namespace content | |
| 51 | |
| 52 #define INCLUDE_TEST_FROM_BASE_CLASS(test_fixture, test_name) \ | |
| 53 IN_PROC_BROWSER_TEST_F(test_fixture, test_name) {\ | |
| 54 test_name();\ | |
| 55 } | |
| 56 | |
| 57 #endif // CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_INTEGRATION_BROWSER_TEST_ BASE_H_ | |
| OLD | NEW |