| 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 15 matching lines...) Expand all Loading... |
| 26 #include "testing/perf/perf_test.h" | 26 #include "testing/perf/perf_test.h" |
| 27 | 27 |
| 28 static const char kMainWebrtcTestHtmlPage[] = | 28 static const char kMainWebrtcTestHtmlPage[] = |
| 29 "/webrtc/webrtc_jsep01_test.html"; | 29 "/webrtc/webrtc_jsep01_test.html"; |
| 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 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 36 virtual 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 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 40 virtual void SetUpCommandLine(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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 const base::DictionaryValue* first_pc_dict = | 125 const base::DictionaryValue* first_pc_dict = |
| 126 GetDataOnFirstPeerConnection(all_data.get()); | 126 GetDataOnFirstPeerConnection(all_data.get()); |
| 127 ASSERT_TRUE(first_pc_dict != NULL); | 127 ASSERT_TRUE(first_pc_dict != NULL); |
| 128 test::PrintBweForVideoMetrics(*first_pc_dict); | 128 test::PrintBweForVideoMetrics(*first_pc_dict); |
| 129 test::PrintMetricsForAllStreams(*first_pc_dict); | 129 test::PrintMetricsForAllStreams(*first_pc_dict); |
| 130 | 130 |
| 131 HangUp(left_tab); | 131 HangUp(left_tab); |
| 132 HangUp(right_tab); | 132 HangUp(right_tab); |
| 133 } | 133 } |
| OLD | NEW |