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

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

Issue 137753004: Renaming remaining WebRTC browser tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 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 <ctime> 5 #include <ctime>
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/media/webrtc_browsertest_base.h" 9 #include "chrome/browser/media/webrtc_browsertest_base.h"
10 #include "chrome/browser/media/webrtc_browsertest_common.h" 10 #include "chrome/browser/media/webrtc_browsertest_common.h"
(...skipping 29 matching lines...) Expand all
40 40
41 static base::FilePath GetTestDataDir() { 41 static base::FilePath GetTestDataDir() {
42 base::FilePath source_dir; 42 base::FilePath source_dir;
43 PathService::Get(chrome::DIR_TEST_DATA, &source_dir); 43 PathService::Get(chrome::DIR_TEST_DATA, &source_dir);
44 return source_dir; 44 return source_dir;
45 } 45 }
46 46
47 // Test that the typing detection feature works. 47 // Test that the typing detection feature works.
48 // You must have the src-internal solution in your .gclient to put the required 48 // You must have the src-internal solution in your .gclient to put the required
49 // pyauto_private directory into chrome/test/data/. 49 // pyauto_private directory into chrome/test/data/.
50 class WebrtcTypingDetectionBrowserTest : public WebRtcTestBase { 50 class WebRtcTypingDetectionBrowserTest : public WebRtcTestBase {
51 public: 51 public:
52 // TODO(phoglund): clean up duplication from audio quality browser test when 52 // TODO(phoglund): clean up duplication from audio quality browser test when
53 // this test is complete and is proven to work. 53 // this test is complete and is proven to work.
54 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 54 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
55 PeerConnectionServerRunner::KillAllPeerConnectionServersOnCurrentSystem(); 55 PeerConnectionServerRunner::KillAllPeerConnectionServersOnCurrentSystem();
56 } 56 }
57 57
58 bool HasAllRequiredResources() { 58 bool HasAllRequiredResources() {
59 base::FilePath reference_file = 59 base::FilePath reference_file =
60 GetTestDataDir().Append(kReferenceFile); 60 GetTestDataDir().Append(kReferenceFile);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 void WaitUntilHangupVerified(content::WebContents* tab_contents) { 101 void WaitUntilHangupVerified(content::WebContents* tab_contents) {
102 EXPECT_TRUE(PollingWaitUntil("getPeerConnectionReadyState()", 102 EXPECT_TRUE(PollingWaitUntil("getPeerConnectionReadyState()",
103 "no-peer-connection", tab_contents)); 103 "no-peer-connection", tab_contents));
104 } 104 }
105 105
106 PeerConnectionServerRunner peerconnection_server_; 106 PeerConnectionServerRunner peerconnection_server_;
107 }; 107 };
108 108
109 // TODO(phoglund): enable when fully implemented. 109 // TODO(phoglund): enable when fully implemented.
110 IN_PROC_BROWSER_TEST_F(WebrtcTypingDetectionBrowserTest, 110 IN_PROC_BROWSER_TEST_F(WebRtcTypingDetectionBrowserTest,
111 DISABLED_MANUAL_TestTypingDetection) { 111 DISABLED_MANUAL_TestTypingDetection) {
112 // TODO(phoglund): make this use embedded_test_server when that test server 112 // TODO(phoglund): make this use embedded_test_server when that test server
113 // can handle files > ~400Kb. 113 // can handle files > ~400Kb.
114 ASSERT_TRUE(test_server()->Start()); 114 ASSERT_TRUE(test_server()->Start());
115 ASSERT_TRUE(peerconnection_server_.Start()); 115 ASSERT_TRUE(peerconnection_server_.Start());
116 116
117 ui_test_utils::NavigateToURL( 117 ui_test_utils::NavigateToURL(
118 browser(), test_server()->GetURL(kMainWebrtcTestHtmlPage)); 118 browser(), test_server()->GetURL(kMainWebrtcTestHtmlPage));
119 content::WebContents* left_tab = 119 content::WebContents* left_tab =
120 browser()->tab_strip_model()->GetActiveWebContents(); 120 browser()->tab_strip_model()->GetActiveWebContents();
(...skipping 28 matching lines...) Expand all
149 // TODO(phoglund): simulate key presses, look for changes in typing detection 149 // TODO(phoglund): simulate key presses, look for changes in typing detection
150 // state. 150 // state.
151 SleepInJavascript(left_tab, 10000); 151 SleepInJavascript(left_tab, 10000);
152 152
153 HangUp(left_tab); 153 HangUp(left_tab);
154 WaitUntilHangupVerified(left_tab); 154 WaitUntilHangupVerified(left_tab);
155 WaitUntilHangupVerified(right_tab); 155 WaitUntilHangupVerified(right_tab);
156 156
157 ASSERT_TRUE(peerconnection_server_.Stop()); 157 ASSERT_TRUE(peerconnection_server_.Stop());
158 } 158 }
OLDNEW
« no previous file with comments | « chrome/browser/media/chrome_webrtc_browsertest.cc ('k') | chrome/browser/media/chrome_webrtc_video_quality_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698