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

Unified Diff: content/browser/indexed_db/indexed_db_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/indexed_db/indexed_db_browsertest.cc
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 03183f036ae4399d2b605576da4437203ce4db97..d02e8e84057b1d0bb4812feddd1cfdfa886ea68e 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -20,6 +20,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/thread_test_helper.h"
+#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/indexed_db/indexed_db_class_factory.h"
@@ -425,9 +426,12 @@ IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, LevelDBLogFileTest) {
base::FilePath log_file(FILE_PATH_LITERAL("LOG"));
base::FilePath log_file_path =
GetContext()->data_path().Append(leveldb_dir).Append(log_file);
- int64_t size;
- EXPECT_TRUE(base::GetFileSize(log_file_path, &size));
- EXPECT_GT(size, 0);
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_verification;
+ int64_t size;
+ EXPECT_TRUE(base::GetFileSize(log_file_path, &size));
+ EXPECT_GT(size, 0);
+ }
}
IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, CanDeleteWhenOverQuotaTest) {

Powered by Google App Engine
This is Rietveld 408576698