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

Unified Diff: content/browser/media/webrtc_browsertest.cc

Issue 334743006: Support multiple files for AEC dump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review (sky). Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/media/webrtc_browsertest.cc
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
index 729d64a112f79d5363f6c89e83dc337158442585..610871955b34adab6b8bb14ec793cafc4e57e9bc 100644
--- a/content/browser/media/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "base/file_util.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/threading/platform_thread.h"
#include "base/values.h"
@@ -410,6 +411,21 @@ IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithAecDump) {
DisableOpusIfOnAndroid();
ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
+ // Get the ID for the render process host.
+ int render_process_host_id = -1;
+ for (RenderProcessHost::iterator i(
+ content::RenderProcessHost::AllHostsIterator());
+ !i.IsAtEnd(); i.Advance()) {
+ render_process_host_id = i.GetCurrentValue()->GetID();
+ break;
Tom Sepez 2014/06/16 17:33:18 I'm confused by this loop which seems to only exec
Henrik Grunell 2014/06/17 20:21:40 Right, the loop is not needed. (Copy paste error.)
+ }
+ EXPECT_GE(render_process_host_id, 0);
+
+ // Add file extensions that we expect to be added.
+ static const int kExpectedConsumerId = 0;
+ dump_file = dump_file.AddExtension(base::IntToString(render_process_host_id))
+ .AddExtension(base::IntToString(kExpectedConsumerId));
+
EXPECT_TRUE(base::PathExists(dump_file));
int64 file_size = 0;
EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
« no previous file with comments | « no previous file | content/browser/renderer_host/render_process_host_impl.h » ('j') | content/common/media/aec_dump_messages.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698