OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/process_util.h" | 7 #include "base/process_util.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "chrome/browser/api/infobars/infobar_service.h" | 10 #include "chrome/browser/api/infobars/infobar_service.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 static const char kMainWebrtcTestHtmlPage[] = | 33 static const char kMainWebrtcTestHtmlPage[] = |
34 "files/webrtc/webrtc_jsep01_test.html"; | 34 "files/webrtc/webrtc_jsep01_test.html"; |
35 | 35 |
36 // Top-level integration test for WebRTC. Requires a real webcam and microphone | 36 // Top-level integration test for WebRTC. Requires a real webcam and microphone |
37 // on the running system. This test is not meant to run in the main browser | 37 // on the running system. This test is not meant to run in the main browser |
38 // test suite since normal tester machines do not have webcams. | 38 // test suite since normal tester machines do not have webcams. |
39 class WebrtcBrowserTest : public InProcessBrowserTest { | 39 class WebrtcBrowserTest : public InProcessBrowserTest { |
40 public: | 40 public: |
41 WebrtcBrowserTest() : peerconnection_server_(0) {} | 41 WebrtcBrowserTest() : peerconnection_server_(0) {} |
42 | 42 |
43 void SetUp() OVERRIDE { | 43 virtual void SetUp() OVERRIDE { |
44 RunPeerConnectionServer(); | 44 RunPeerConnectionServer(); |
45 InProcessBrowserTest::SetUp(); | 45 InProcessBrowserTest::SetUp(); |
46 } | 46 } |
47 | 47 |
48 void TearDown() OVERRIDE { | 48 virtual void TearDown() OVERRIDE { |
49 ShutdownPeerConnectionServer(); | 49 ShutdownPeerConnectionServer(); |
50 InProcessBrowserTest::TearDown(); | 50 InProcessBrowserTest::TearDown(); |
51 } | 51 } |
52 | 52 |
53 void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 53 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
54 // TODO(phoglund): check that user actually has the requisite devices and | 54 // TODO(phoglund): check that user actually has the requisite devices and |
55 // print a nice message if not; otherwise the test just times out which can | 55 // print a nice message if not; otherwise the test just times out which can |
56 // be confusing. | 56 // be confusing. |
57 // This test expects real device handling and requires a real webcam / audio | 57 // This test expects real device handling and requires a real webcam / audio |
58 // device; it will not work with fake devices. | 58 // device; it will not work with fake devices. |
59 EXPECT_FALSE(command_line->HasSwitch( | 59 EXPECT_FALSE(command_line->HasSwitch( |
60 switches::kUseFakeDeviceForMediaStream)); | 60 switches::kUseFakeDeviceForMediaStream)); |
61 } | 61 } |
62 | 62 |
63 // TODO(phoglund): This ugly poll method is only here while we transition | 63 // TODO(phoglund): This ugly poll method is only here while we transition |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 WaitForVideo(left_tab); | 226 WaitForVideo(left_tab); |
227 WaitForVideo(right_tab); | 227 WaitForVideo(right_tab); |
228 | 228 |
229 HangUp(left_tab); | 229 HangUp(left_tab); |
230 WaitUntilHangupVerified(left_tab); | 230 WaitUntilHangupVerified(left_tab); |
231 WaitUntilHangupVerified(right_tab); | 231 WaitUntilHangupVerified(right_tab); |
232 | 232 |
233 AssertNoAsynchronousErrors(left_tab); | 233 AssertNoAsynchronousErrors(left_tab); |
234 AssertNoAsynchronousErrors(right_tab); | 234 AssertNoAsynchronousErrors(right_tab); |
235 } | 235 } |
OLD | NEW |