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

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

Issue 2175933002: More aggressive IO asserts in content_browsertests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use 1 less instance of ScopedAllowIO in DumpAccessibilityTestBase::RunTestForPlatform. Created 4 years, 5 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/webrtc_audio_debug_recordings_browsertest.cc
diff --git a/content/browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc b/content/browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc
index f098d77ae4e9de93e2607608dcd876222e807985..92054988cba7d81017c64d54a94631a0e54d11ba 100644
--- a/content/browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc
+++ b/content/browser/media/webrtc/webrtc_audio_debug_recordings_browsertest.cc
@@ -7,6 +7,7 @@
#include "base/process/process_handle.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "content/browser/media/webrtc/webrtc_internals.h"
#include "content/browser/web_contents/web_contents_impl.h"
@@ -173,8 +174,11 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
NavigateToURL(shell(), GURL(""));
base::FilePath base_file;
- ASSERT_TRUE(CreateTemporaryFile(&base_file));
- base::DeleteFile(base_file, false);
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_creating_test_path;
+ ASSERT_TRUE(CreateTemporaryFile(&base_file));
+ base::DeleteFile(base_file, false);
+ }
// This fakes the behavior of another open tab with webrtc-internals, and
// enabling AEC dump in that tab, then disabling it.
@@ -190,14 +194,20 @@ IN_PROC_BROWSER_TEST_F(WebRtcAudioDebugRecordingsBrowserTest,
EXPECT_TRUE(GetRenderProcessHostId(&render_process_id));
base::FilePath aec_dump_file = GetExpectedAecDumpFileName(base_file,
render_process_id);
- EXPECT_FALSE(base::PathExists(aec_dump_file));
- base::DeleteFile(aec_dump_file, false);
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification;
+ EXPECT_FALSE(base::PathExists(aec_dump_file));
+ base::DeleteFile(aec_dump_file, false);
+ }
// Verify that the expected input audio file doesn't exist.
base::FilePath input_audio_file =
GetExpectedInputAudioFileName(base_file, render_process_id);
- EXPECT_FALSE(base::PathExists(input_audio_file));
- base::DeleteFile(input_audio_file, false);
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification;
+ EXPECT_FALSE(base::PathExists(input_audio_file));
+ base::DeleteFile(input_audio_file, false);
+ }
}
// Timing out on ARM linux bot: http://crbug.com/238490
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/media/webrtc/webrtc_getusermedia_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698