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

Unified Diff: content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc

Issue 2764843002: Hangup call in WebRtcAudioDebugRecordingsBrowserTest. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
diff --git a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
index f974d469fd3eb7d16834974026efd0426fb4aedb..1b7f9478111aec1dcf72b4deaeac554b754055f7 100644
--- a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
+++ b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
@@ -139,6 +139,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
NavigateToURL(shell(), url);
ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
+ ExecuteJavascriptAndWaitForOk("hangup();");
WebRTCInternals::GetInstance()->DisableAudioDebugRecordings();
@@ -151,7 +152,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
int64_t file_size = 0;
EXPECT_TRUE(base::GetFileSize(file_path, &file_size));
EXPECT_GT(file_size, 0);
- base::DeleteFile(file_path, false);
+ EXPECT_TRUE(base::DeleteFile(file_path, false));
// Verify that the expected input audio file exists and contains some data.
file_path = GetExpectedInputAudioFileName(base_file_path, render_process_id);
@@ -159,7 +160,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
file_size = 0;
EXPECT_TRUE(base::GetFileSize(file_path, &file_size));
EXPECT_GT(file_size, kWaveHeaderSizeBytes);
- base::DeleteFile(file_path, false);
+ EXPECT_TRUE(base::DeleteFile(file_path, false));
// Verify that the expected output audio files exists and contains some data.
// Two files are expected, one for each peer in the call.
@@ -173,15 +174,12 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
EXPECT_TRUE(base::GetFileSize(file_path, &file_size));
EXPECT_GT(file_size, kWaveHeaderSizeBytes);
#endif
- base::DeleteFile(file_path, false);
+ EXPECT_TRUE(base::DeleteFile(file_path, false));
}
- // Remove temp dir.
- // TODO(grunell): Re-enable or remove the following line as part of
- // http://crbug.com/697845. If re-enabled, also add expectations on
- // base::DeleteFile() success.
- // EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path));
- base::DeleteFile(temp_dir_path, false);
+ // Verify that no other files exist and remove temp dir.
+ EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path));
+ EXPECT_TRUE(base::DeleteFile(temp_dir_path, false));
base::ThreadRestrictions::SetIOAllowed(prev_io_allowed);
}
@@ -227,6 +225,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
NavigateToURL(shell(), url);
ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
+ ExecuteJavascriptAndWaitForOk("hangup();");
// Verify that no files exist and remove temp dir.
EXPECT_TRUE(base::IsDirectoryEmpty(temp_dir_path));
@@ -277,6 +276,10 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
shell2, "call({video: true, audio: true});", &result));
ASSERT_STREQ("OK", result.c_str());
+ ExecuteJavascriptAndWaitForOk("hangup();");
+ EXPECT_TRUE(ExecuteScriptAndExtractString(shell2, "hangup();", &result));
+ ASSERT_STREQ("OK", result.c_str());
+
WebRTCInternals::GetInstance()->DisableAudioDebugRecordings();
RenderProcessHost::iterator it =
« no previous file with comments | « no previous file | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698