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

Unified Diff: chrome/test/base/in_process_browser_test.cc

Issue 2178683002: More aggressive IO asserts in browser_tests. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/in_process_browser_test.cc
diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc
index e277349d4ab37ad0707039713aee568d43c7fa1d..ba2c426d50a03d5a0272ad3ab1d1f73550b07de7 100644
--- a/chrome/test/base/in_process_browser_test.cc
+++ b/chrome/test/base/in_process_browser_test.cc
@@ -19,6 +19,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/test/test_file_util.h"
#include "base/threading/non_thread_safe.h"
+#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -540,8 +541,11 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() {
autorelease_pool_->Recycle();
#endif
- if (!HasFatalFailure())
+ if (!HasFatalFailure()) {
+ bool old_io_allowed_value = base::ThreadRestrictions::SetIOAllowed(false);
RunTestOnMainThread();
+ base::ThreadRestrictions::SetIOAllowed(old_io_allowed_value);
+ }
#if defined(OS_MACOSX)
autorelease_pool_->Recycle();
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698