Chromium Code Reviews| Index: chrome/browser/media/defer_background_media_browsertest.cc |
| diff --git a/chrome/browser/media/defer_background_media_browsertest.cc b/chrome/browser/media/defer_background_media_browsertest.cc |
| index daa3e6b8dc5863f32d03a945af821eb89ee8c8c8..edf4a35f7f57e3299488a28e22962f0da780974e 100644 |
| --- a/chrome/browser/media/defer_background_media_browsertest.cc |
| +++ b/chrome/browser/media/defer_background_media_browsertest.cc |
| @@ -2,19 +2,26 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| +#include "base/command_line.h" |
| #include "base/strings/utf_string_conversions.h" |
| #include "build/build_config.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| #include "chrome/test/base/in_process_browser_test.h" |
| #include "chrome/test/base/ui_test_utils.h" |
| +#include "content/public/common/content_switches.h" |
| #include "content/public/test/browser_test_utils.h" |
| #include "media/base/test_data_util.h" |
| -// TODO(dalecurtis): Android does not correctly defer media today, fix and |
| -// enable this test (needs disable of user gesture). http://crbug.com/522157 |
| -#if !defined(OS_ANDROID) |
| -typedef InProcessBrowserTest MediaBrowserTest; |
| +class MediaBrowserTest : public InProcessBrowserTest { |
|
DaleCurtis
2015/08/18 23:14:42
I can't actually compile the chrome browser tests
qinmin
2015/08/19 21:31:14
android dosn't run browser_tests, it runs chrome_t
DaleCurtis
2015/08/20 17:59:22
Hmm, chrome_test_apk is not a target and I can't f
DaleCurtis
2015/08/20 18:00:24
And right after I posted this, I found the right a
DaleCurtis
2015/08/20 18:47:10
Doesn't look like those targets include any type o
|
| + public: |
| +#if defined(OS_ANDROID) |
| + void SetUpCommandLine(base::CommandLine* command_line) override { |
| + command_line->AppendSwitch( |
| + switches::kDisableGestureRequirementForMediaPlayback); |
| + } |
| +#endif |
| +}; |
| IN_PROC_BROWSER_TEST_F(MediaBrowserTest, BackgroundMediaIsDeferred) { |
| // Navigate to a video file, which would autoplay in the foreground, but won't |
| @@ -57,4 +64,3 @@ IN_PROC_BROWSER_TEST_F(MediaBrowserTest, BackgroundMediaIsDeferred) { |
| watcher.AlsoWaitForTitle(ended_str); |
| EXPECT_EQ(playing_str, watcher.WaitAndGetTitle()); |
| } |
| -#endif // !defined(OS_ANDROID) |