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

Side by Side Diff: chrome/browser/media/chrome_webrtc_browsertest.cc

Issue 1673183002: Enable H.264 video WebRTC behind run-time flag and add WebRtcBrowserTest for H.264 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed stuff, removing references to 'finch' Created 4 years, 10 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
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/media/webrtc_browsertest_base.h" 8 #include "chrome/browser/media/webrtc_browsertest_base.h"
9 #include "chrome/browser/media/webrtc_browsertest_common.h" 9 #include "chrome/browser/media/webrtc_browsertest_common.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_tabstrip.h" 11 #include "chrome/browser/ui/browser_tabstrip.h"
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" 12 #include "chrome/browser/ui/tabs/tab_strip_model.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/test/base/in_process_browser_test.h" 14 #include "chrome/test/base/in_process_browser_test.h"
15 #include "chrome/test/base/ui_test_utils.h" 15 #include "chrome/test/base/ui_test_utils.h"
16 #include "content/public/common/common_features.h"
16 #include "content/public/common/content_switches.h" 17 #include "content/public/common/content_switches.h"
18 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h"
17 #include "content/public/test/browser_test_utils.h" 19 #include "content/public/test/browser_test_utils.h"
18 #include "media/base/media_switches.h" 20 #include "media/base/media_switches.h"
19 #include "net/test/embedded_test_server/embedded_test_server.h" 21 #include "net/test/embedded_test_server/embedded_test_server.h"
20 22
21 static const char kMainWebrtcTestHtmlPage[] = 23 static const char kMainWebrtcTestHtmlPage[] =
22 "/webrtc/webrtc_jsep01_test.html"; 24 "/webrtc/webrtc_jsep01_test.html";
23 25
24 // Top-level integration test for WebRTC. It always uses fake devices; see 26 // Top-level integration test for WebRTC. It always uses fake devices; see
25 // WebRtcWebcamBrowserTest for a test that acquires any real webcam on the 27 // WebRtcWebcamBrowserTest for a test that acquires any real webcam on the
26 // system. 28 // system.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, 75 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
74 RunsAudioVideoWebRTCCallInTwoTabsVP8) { 76 RunsAudioVideoWebRTCCallInTwoTabsVP8) {
75 RunsAudioVideoWebRTCCallInTwoTabs("VP8"); 77 RunsAudioVideoWebRTCCallInTwoTabs("VP8");
76 } 78 }
77 79
78 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, 80 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
79 RunsAudioVideoWebRTCCallInTwoTabsVP9) { 81 RunsAudioVideoWebRTCCallInTwoTabsVP9) {
80 RunsAudioVideoWebRTCCallInTwoTabs("VP9"); 82 RunsAudioVideoWebRTCCallInTwoTabs("VP9");
81 } 83 }
82 84
85 #if BUILDFLAG(RTC_USE_H264)
86
87 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
88 RunsAudioVideoWebRTCCallInTwoTabsH264) {
89 // Only run test if run-time feature corresponding to |rtc_use_h264| is on.
90 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) {
91 LOG(WARNING) << "Run-time feature WebRtcH264WithOpenH264FFmpeg disabled. "
92 "Skipping WebRtcBrowserTest.RunsAudioVideoWebRTCCallInTwoTabsH264 "
93 "(test \"OK\")";
94 return;
95 }
96 RunsAudioVideoWebRTCCallInTwoTabs("H264");
97 }
98
99 #endif // BUILDFLAG(RTC_USE_H264)
100
83 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, TestWebAudioMediaStream) { 101 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, TestWebAudioMediaStream) {
84 // This tests against crash regressions for the WebAudio-MediaStream 102 // This tests against crash regressions for the WebAudio-MediaStream
85 // integration. 103 // integration.
86 if (OnWinXp()) return; 104 if (OnWinXp()) return;
87 105
88 ASSERT_TRUE(embedded_test_server()->Start()); 106 ASSERT_TRUE(embedded_test_server()->Start());
89 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html")); 107 GURL url(embedded_test_server()->GetURL("/webrtc/webaudio_crash.html"));
90 ui_test_utils::NavigateToURL(browser(), url); 108 ui_test_utils::NavigateToURL(browser(), url);
91 content::WebContents* tab = 109 content::WebContents* tab =
92 browser()->tab_strip_model()->GetActiveWebContents(); 110 browser()->tab_strip_model()->GetActiveWebContents();
93 111
94 // A sleep is necessary to be able to detect the crash. 112 // A sleep is necessary to be able to detect the crash.
95 test::SleepInJavascript(tab, 1000); 113 test::SleepInJavascript(tab, 1000);
96 114
97 ASSERT_FALSE(tab->IsCrashed()); 115 ASSERT_FALSE(tab->IsCrashed());
98 } 116 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698