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

Side by Side Diff: trunk/src/content/browser/media/media_source_browsertest.cc

Issue 383063009: Revert 282795 "Have media content and chrome browser tests load ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/media_browsertest.h" 6 #include "content/browser/media/media_browsertest.h"
7 #include "content/public/common/content_switches.h" 7 #include "content/public/common/content_switches.h"
8 #if defined(OS_ANDROID) 8 #if defined(OS_ANDROID)
9 #include "base/android/build_info.h" 9 #include "base/android/build_info.h"
10 #endif 10 #endif
(...skipping 14 matching lines...) Expand all
25 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { 25 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
26 VLOG(0) << "MSE is only supported in Android 4.1 and later."; 26 VLOG(0) << "MSE is only supported in Android 4.1 and later.";
27 return false; 27 return false;
28 } 28 }
29 #endif // defined(OS_ANDROID) 29 #endif // defined(OS_ANDROID)
30 return true; 30 return true;
31 } 31 }
32 32
33 class MediaSourceTest : public content::MediaBrowserTest { 33 class MediaSourceTest : public content::MediaBrowserTest {
34 public: 34 public:
35 void TestSimplePlayback(const std::string& media_file, 35 void TestSimplePlayback(const char* media_file, const char* media_type,
36 const std::string& media_type, 36 const char* expectation) {
37 const std::string& expectation) {
38 if (!IsMSESupported()) { 37 if (!IsMSESupported()) {
39 VLOG(0) << "Skipping test - MSE not supported."; 38 VLOG(0) << "Skipping test - MSE not supported.";
40 return; 39 return;
41 } 40 }
42 41
43 media::QueryParams query_params; 42 std::vector<StringPair> query_params;
44 query_params.push_back(std::make_pair("mediaFile", media_file)); 43 query_params.push_back(std::make_pair("mediafile", media_file));
45 query_params.push_back(std::make_pair("mediaType", media_type)); 44 query_params.push_back(std::make_pair("mediatype", media_type));
46 RunMediaTestPage("media_source_player.html", query_params, expectation, 45 RunMediaTestPage("media_source_player.html", &query_params, expectation,
47 true); 46 true);
48 } 47 }
49 48
50 #if defined(OS_ANDROID) 49 #if defined(OS_ANDROID)
51 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 50 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
52 command_line->AppendSwitch( 51 command_line->AppendSwitch(
53 switches::kDisableGestureRequirementForMediaPlayback); 52 switches::kDisableGestureRequirementForMediaPlayback);
54 } 53 }
55 #endif 54 #endif
56 }; 55 };
(...skipping 21 matching lines...) Expand all
78 TestSimplePlayback("bear-320x240-video-only.webm", kWebMAudioOnly, kError); 77 TestSimplePlayback("bear-320x240-video-only.webm", kWebMAudioOnly, kError);
79 } 78 }
80 79
81 // Flaky test crbug.com/246308 80 // Flaky test crbug.com/246308
82 // Test changed to skip checks resulting in flakiness. Proper fix still needed. 81 // Test changed to skip checks resulting in flakiness. Proper fix still needed.
83 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) { 82 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) {
84 if (!IsMSESupported()) { 83 if (!IsMSESupported()) {
85 VLOG(0) << "Skipping test - MSE not supported."; 84 VLOG(0) << "Skipping test - MSE not supported.";
86 return; 85 return;
87 } 86 }
88 RunMediaTestPage("mse_config_change.html", 87 RunMediaTestPage("mse_config_change.html", NULL, kEnded, true);
89 media::QueryParams(),
90 kEnded,
91 true);
92 } 88 }
93 89
94 } // namespace content 90 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/browser/media/media_browsertest.cc ('k') | trunk/src/content/test/data/media/blackwhite.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698