OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 // Performance browsertest for WebRTC. This test is manual since it takes long | 31 // Performance browsertest for WebRTC. This test is manual since it takes long |
32 // to execute and requires the reference files provided by the webrtc.DEPS | 32 // to execute and requires the reference files provided by the webrtc.DEPS |
33 // solution (which is only available on WebRTC internal bots). | 33 // solution (which is only available on WebRTC internal bots). |
34 class WebRtcPerfBrowserTest : public WebRtcTestBase { | 34 class WebRtcPerfBrowserTest : public WebRtcTestBase { |
35 public: | 35 public: |
36 void SetUpInProcessBrowserTestFixture() override { | 36 void SetUpInProcessBrowserTestFixture() override { |
37 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. | 37 DetectErrorsInJavaScript(); // Look for errors in our rather complex js. |
38 } | 38 } |
39 | 39 |
40 void SetUpCommandLine(CommandLine* command_line) override { | 40 void SetUpCommandLine(base::CommandLine* command_line) override { |
41 // Ensure the infobar is enabled, since we expect that in this test. | 41 // Ensure the infobar is enabled, since we expect that in this test. |
42 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); | 42 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); |
43 | 43 |
44 // Play a suitable, somewhat realistic video file. | 44 // Play a suitable, somewhat realistic video file. |
45 base::FilePath input_video = test::GetReferenceFilesDir() | 45 base::FilePath input_video = test::GetReferenceFilesDir() |
46 .Append(test::kReferenceFileName360p) | 46 .Append(test::kReferenceFileName360p) |
47 .AddExtension(test::kY4mFileExtension); | 47 .AddExtension(test::kY4mFileExtension); |
48 command_line->AppendSwitchPath(switches::kUseFileForFakeVideoCapture, | 48 command_line->AppendSwitchPath(switches::kUseFileForFakeVideoCapture, |
49 input_video); | 49 input_video); |
50 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); | 50 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 const base::DictionaryValue* second_pc_dict = | 187 const base::DictionaryValue* second_pc_dict = |
188 GetDataOnPeerConnection(all_data.get(), 1); | 188 GetDataOnPeerConnection(all_data.get(), 1); |
189 ASSERT_TRUE(second_pc_dict != NULL); | 189 ASSERT_TRUE(second_pc_dict != NULL); |
190 test::PrintBweForVideoMetrics(*second_pc_dict, "_recvonly"); | 190 test::PrintBweForVideoMetrics(*second_pc_dict, "_recvonly"); |
191 test::PrintMetricsForAllStreams(*second_pc_dict, "_recvonly"); | 191 test::PrintMetricsForAllStreams(*second_pc_dict, "_recvonly"); |
192 | 192 |
193 HangUp(left_tab); | 193 HangUp(left_tab); |
194 HangUp(right_tab); | 194 HangUp(right_tab); |
195 } | 195 } |
OLD | NEW |