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

Side by Side Diff: trunk/src/chrome/browser/media/webrtc_browsertest_perf.cc

Issue 217553002: Revert 260213 "Relanding Switched main WebRTC browser tests to u..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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
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 "chrome/browser/media/webrtc_browsertest_perf.h" 5 #include "chrome/browser/media/webrtc_browsertest_perf.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 #include "testing/perf/perf_test.h" 10 #include "testing/perf/perf_test.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 base::DictionaryValue::Iterator stats_iterator(stats_dict); 165 base::DictionaryValue::Iterator stats_iterator(stats_dict);
166 166
167 while (!stats_iterator.IsAtEnd()) { 167 while (!stats_iterator.IsAtEnd()) {
168 if (stats_iterator.key().find("ssrc_") != std::string::npos) 168 if (stats_iterator.key().find("ssrc_") != std::string::npos)
169 result.insert(ExtractSsrcIdentifier(stats_iterator.key())); 169 result.insert(ExtractSsrcIdentifier(stats_iterator.key()));
170 stats_iterator.Advance(); 170 stats_iterator.Advance();
171 } 171 }
172 return result; 172 return result;
173 } 173 }
174 174
175 namespace test {
176
177 void PrintBweForVideoMetrics(const base::DictionaryValue& pc_dict) { 175 void PrintBweForVideoMetrics(const base::DictionaryValue& pc_dict) {
178 const std::string kBweStatsKey = "bweforvideo"; 176 const std::string kBweStatsKey = "bweforvideo";
179 std::string value; 177 std::string value;
180 ASSERT_TRUE(pc_dict.GetString( 178 ASSERT_TRUE(pc_dict.GetString(
181 Statistic("googAvailableSendBandwidth", kBweStatsKey), &value)); 179 Statistic("googAvailableSendBandwidth", kBweStatsKey), &value));
182 perf_test::PrintResult("bwe_stats", "", "available_send_bw", value, "bytes/s", 180 perf_test::PrintResult("bwe_stats", "", "available_send_bw", value, "bytes/s",
183 false); 181 false);
184 ASSERT_TRUE(pc_dict.GetString( 182 ASSERT_TRUE(pc_dict.GetString(
185 Statistic("googAvailableReceiveBandwidth", kBweStatsKey), &value)); 183 Statistic("googAvailableReceiveBandwidth", kBweStatsKey), &value));
186 perf_test::PrintResult("bwe_stats", "", "available_recv_bw", value, "bytes/s", 184 perf_test::PrintResult("bwe_stats", "", "available_recv_bw", value, "bytes/s",
(...skipping 26 matching lines...) Expand all
213 bool did_recognize_stream_type = 211 bool did_recognize_stream_type =
214 MaybePrintResultsForAudioReceive(ssrc, pc_dict) || 212 MaybePrintResultsForAudioReceive(ssrc, pc_dict) ||
215 MaybePrintResultsForAudioSend(ssrc, pc_dict) || 213 MaybePrintResultsForAudioSend(ssrc, pc_dict) ||
216 MaybePrintResultsForVideoReceive(ssrc, pc_dict) || 214 MaybePrintResultsForVideoReceive(ssrc, pc_dict) ||
217 MaybePrintResultsForVideoSend(ssrc, pc_dict); 215 MaybePrintResultsForVideoSend(ssrc, pc_dict);
218 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which " 216 ASSERT_TRUE(did_recognize_stream_type) << "Failed to figure out which "
219 "kind of stream SSRC " << ssrc 217 "kind of stream SSRC " << ssrc
220 << " is. "; 218 << " is. ";
221 } 219 }
222 } 220 }
223
224 } // namespace test
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/media/webrtc_browsertest_perf.h ('k') | trunk/src/chrome/test/data/webrtc/webrtc_jsep01_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698