| OLD | NEW |
| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 firefox_ = base::LaunchProcess(command_line, base::LaunchOptions()); | 225 firefox_ = base::LaunchProcess(command_line, base::LaunchOptions()); |
| 226 return firefox_.IsValid(); | 226 return firefox_.IsValid(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 private: | 229 private: |
| 230 base::Process dev_appserver_; | 230 base::Process dev_appserver_; |
| 231 base::Process firefox_; | 231 base::Process firefox_; |
| 232 base::Process collider_server_; | 232 base::Process collider_server_; |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 // Disabling while the AppRTC application is being fixed. | 235 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) { |
| 236 // See crbug.com/467471 for details. | |
| 237 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, DISABLED_MANUAL_WorksOnApprtc) { | |
| 238 // Disabled on Win XP: http://code.google.com/p/webrtc/issues/detail?id=2703. | 236 // Disabled on Win XP: http://code.google.com/p/webrtc/issues/detail?id=2703. |
| 239 if (OnWinXp()) | 237 if (OnWinXp()) |
| 240 return; | 238 return; |
| 241 | 239 |
| 242 DetectErrorsInJavaScript(); | 240 DetectErrorsInJavaScript(); |
| 243 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999")); | 241 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999")); |
| 244 ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089")); | 242 ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089")); |
| 245 while (!LocalApprtcInstanceIsUp()) | 243 while (!LocalApprtcInstanceIsUp()) |
| 246 DVLOG(1) << "Waiting for AppRTC to come up..."; | 244 DVLOG(1) << "Waiting for AppRTC to come up..."; |
| 247 | 245 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 258 ASSERT_TRUE(WaitForCallToComeUp(right_tab)); | 256 ASSERT_TRUE(WaitForCallToComeUp(right_tab)); |
| 259 | 257 |
| 260 ASSERT_TRUE(DetectRemoteVideoPlaying(left_tab)); | 258 ASSERT_TRUE(DetectRemoteVideoPlaying(left_tab)); |
| 261 ASSERT_TRUE(DetectRemoteVideoPlaying(right_tab)); | 259 ASSERT_TRUE(DetectRemoteVideoPlaying(right_tab)); |
| 262 | 260 |
| 263 chrome::CloseWebContents(browser(), left_tab, false); | 261 chrome::CloseWebContents(browser(), left_tab, false); |
| 264 chrome::CloseWebContents(browser(), right_tab, false); | 262 chrome::CloseWebContents(browser(), right_tab, false); |
| 265 } | 263 } |
| 266 | 264 |
| 267 #if defined(OS_LINUX) | 265 #if defined(OS_LINUX) |
| 268 // Disabling while the AppRTC application is being fixed. | 266 #define MAYBE_MANUAL_FirefoxApprtcInteropTest MANUAL_FirefoxApprtcInteropTest |
| 269 // See crbug.com/467471 for details. | |
| 270 #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInter
opTest | |
| 271 #else | 267 #else |
| 272 // Not implemented yet on Windows and Mac. | 268 // Not implemented yet on Windows and Mac. |
| 273 #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInter
opTest | 269 #define MAYBE_MANUAL_FirefoxApprtcInteropTest DISABLED_MANUAL_FirefoxApprtcInter
opTest |
| 274 #endif | 270 #endif |
| 275 | 271 |
| 276 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, | 272 IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, |
| 277 MAYBE_MANUAL_FirefoxApprtcInteropTest) { | 273 MAYBE_MANUAL_FirefoxApprtcInteropTest) { |
| 278 // Disabled on Win XP: http://code.google.com/p/webrtc/issues/detail?id=2703. | 274 // Disabled on Win XP: http://code.google.com/p/webrtc/issues/detail?id=2703. |
| 279 if (OnWinXp()) | 275 if (OnWinXp()) |
| 280 return; | 276 return; |
| 281 | 277 |
| 282 DetectErrorsInJavaScript(); | 278 DetectErrorsInJavaScript(); |
| 283 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999")); | 279 ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999")); |
| 284 ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089")); | 280 ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089")); |
| 285 while (!LocalApprtcInstanceIsUp()) | 281 while (!LocalApprtcInstanceIsUp()) |
| 286 DVLOG(1) << "Waiting for AppRTC to come up..."; | 282 DVLOG(1) << "Waiting for AppRTC to come up..."; |
| 287 | 283 |
| 288 GURL room_url = GURL("http://localhost:9999/r/some_room" | 284 GURL room_url = GURL("http://localhost:9999/r/some_room" |
| 289 "?wshpp=localhost:8089&wstls=false" | 285 "?wshpp=localhost:8089&wstls=false" |
| 290 "&firefox_fake_device=1"); | 286 "&firefox_fake_device=1"); |
| 291 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); | 287 content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); |
| 292 | 288 |
| 293 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); | 289 ASSERT_TRUE(LaunchFirefoxWithUrl(room_url)); |
| 294 | 290 |
| 295 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); | 291 ASSERT_TRUE(WaitForCallToComeUp(chrome_tab)); |
| 296 | 292 |
| 297 // Ensure Firefox manages to send video our way. | 293 // Ensure Firefox manages to send video our way. |
| 298 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); | 294 ASSERT_TRUE(DetectRemoteVideoPlaying(chrome_tab)); |
| 299 } | 295 } |
| OLD | NEW |