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

Side by Side Diff: content/browser/media/media_browsertest.cc

Issue 2928873002: Enable VP9 in MP4 by default (Closed)
Patch Set: Created 3 years, 6 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 (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 "content/browser/media/media_browsertest.h" 5 #include "content/browser/media/media_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 18 matching lines...) Expand all
29 29
30 // Upper case event name set by Utils.installTitleEventHandler(). 30 // Upper case event name set by Utils.installTitleEventHandler().
31 const char MediaBrowserTest::kEnded[] = "ENDED"; 31 const char MediaBrowserTest::kEnded[] = "ENDED";
32 const char MediaBrowserTest::kErrorEvent[] = "ERROR"; 32 const char MediaBrowserTest::kErrorEvent[] = "ERROR";
33 33
34 // Lower case event name as set by Utils.failTest(). 34 // Lower case event name as set by Utils.failTest().
35 const char MediaBrowserTest::kError[] = "error"; 35 const char MediaBrowserTest::kError[] = "error";
36 36
37 void MediaBrowserTest::SetUpCommandLine(base::CommandLine* command_line) { 37 void MediaBrowserTest::SetUpCommandLine(base::CommandLine* command_line) {
38 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests); 38 command_line->AppendSwitch(switches::kIgnoreAutoplayRestrictionsForTests);
39 command_line->AppendSwitch(switches::kEnableVp9InMp4);
40 } 39 }
41 40
42 void MediaBrowserTest::RunMediaTestPage(const std::string& html_page, 41 void MediaBrowserTest::RunMediaTestPage(const std::string& html_page,
43 const base::StringPairs& query_params, 42 const base::StringPairs& query_params,
44 const std::string& expected_title, 43 const std::string& expected_title,
45 bool http) { 44 bool http) {
46 GURL gurl; 45 GURL gurl;
47 std::string query = media::GetURLQueryString(query_params); 46 std::string query = media::GetURLQueryString(query_params);
48 std::unique_ptr<net::EmbeddedTestServer> http_test_server; 47 std::unique_ptr<net::EmbeddedTestServer> http_test_server;
49 if (http) { 48 if (http) {
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { 298 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) {
300 PlayVideo("bear.webm", false); 299 PlayVideo("bear.webm", false);
301 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); 300 NavigateToURL(shell(), GURL(url::kAboutBlankURL));
302 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); 301 EXPECT_FALSE(shell()->web_contents()->IsCrashed());
303 } 302 }
304 303
305 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); 304 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false));
306 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); 305 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true));
307 306
308 } // namespace content 307 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698