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

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

Issue 309273002: Explicitly shutting down tabs and server at end of apprtc test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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/files/file_enumerator.h" 6 #include "base/files/file_enumerator.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/process/launch.h" 8 #include "base/process/launch.h"
9 #include "base/rand_util.h" 9 #include "base/rand_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // runs on Linux for now anyway. 213 // runs on Linux for now anyway.
214 base::FileEnumerator dev_video(base::FilePath(FILE_PATH_LITERAL("/dev")), 214 base::FileEnumerator dev_video(base::FilePath(FILE_PATH_LITERAL("/dev")),
215 false, base::FileEnumerator::FILES, 215 false, base::FileEnumerator::FILES,
216 FILE_PATH_LITERAL("video*")); 216 FILE_PATH_LITERAL("video*"));
217 return !dev_video.Next().empty(); 217 return !dev_video.Next().empty();
218 #endif 218 #endif
219 NOTREACHED(); 219 NOTREACHED();
220 return false; 220 return false;
221 } 221 }
222 222
223 // TODO(phoglund): should be private again after win-only experiments.
224 base::ProcessHandle dev_appserver_;
225
223 private: 226 private:
224 base::ProcessHandle dev_appserver_;
225 base::ProcessHandle firefox_; 227 base::ProcessHandle firefox_;
226 }; 228 };
227 229
228 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) { 230 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) {
229 // TODO(phoglund): temporary diagnostics to debug the crbug.com/377383 231 // TODO(phoglund): temporary diagnostics to debug the crbug.com/377383
230 // heisenbug. 232 // heisenbug.
231 base::ElapsedTimer timer; 233 base::ElapsedTimer timer;
232 234
233 // TODO(mcasas): Remove Win version filtering when this bug gets fixed: 235 // TODO(mcasas): Remove Win version filtering when this bug gets fixed:
234 // http://code.google.com/p/webrtc/issues/detail?id=2703 236 // http://code.google.com/p/webrtc/issues/detail?id=2703
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ASSERT_TRUE(WaitForCallToHangUp(right_tab)); 279 ASSERT_TRUE(WaitForCallToHangUp(right_tab));
278 280
279 LOG(INFO) << "Hung up; " << timer.Elapsed().InSeconds() 281 LOG(INFO) << "Hung up; " << timer.Elapsed().InSeconds()
280 << " seconds elapsed."; 282 << " seconds elapsed.";
281 283
282 // TODO(phoglund): trying to tease out apprtc races. 284 // TODO(phoglund): trying to tease out apprtc races.
283 test::SleepInJavascript(left_tab, 2000); 285 test::SleepInJavascript(left_tab, 2000);
284 286
285 LOG(INFO) << "Slept a bit; " << timer.Elapsed().InSeconds() 287 LOG(INFO) << "Slept a bit; " << timer.Elapsed().InSeconds()
286 << " seconds elapsed."; 288 << " seconds elapsed.";
289
290 #if defined (OS_WIN)
291 // TODO(phoglund): experimenting with explicitly tearing down here.
292 chrome::CloseWebContents(browser(), left_tab, false);
293 LOG(INFO) << "Closed left tab.";
294 chrome::CloseWebContents(browser(), right_tab, false);
295 LOG(INFO) << "Closed right tab.";
296
297 base::KillProcess(dev_appserver_, 0, false);
298 #endif
287 } 299 }
288 300
289 #if defined(OS_LINUX) 301 #if defined(OS_LINUX)
290 #define MAYBE_MANUAL_FirefoxApprtcInteropTest MANUAL_FirefoxApprtcInteropTest 302 #define MAYBE_MANUAL_FirefoxApprtcInteropTest MANUAL_FirefoxApprtcInteropTest
291 #else 303 #else
292 // Not implemented yet on Windows and Mac. 304 // Not implemented yet on Windows and Mac.
293 #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInter opTest 305 #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInter opTest
294 #endif 306 #endif
295 307
296 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, 308 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest,
(...skipping 19 matching lines...) Expand all
316 base::RandInt(0, 65536))); 328 base::RandInt(0, 65536)));
317 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); 329 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url);
318 330
319 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); 331 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url));
320 332
321 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); 333 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab));
322 334
323 // Ensure Firefox manages to send video our way. 335 // Ensure Firefox manages to send video our way.
324 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); 336 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab));
325 } 337 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698