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

Unified Diff: content/public/test/content_browser_test_utils.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
« no previous file with comments | « content/public/test/content_browser_test_utils.h ('k') | content/renderer/dom_serializer_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/content_browser_test_utils.cc
diff --git a/content/public/test/content_browser_test_utils.cc b/content/public/test/content_browser_test_utils.cc
index b77a2724d31722b87715645e4307b8cb69094134..971bff095b1164b4520a7be070e7e256ee65d73e 100644
--- a/content/public/test/content_browser_test_utils.cc
+++ b/content/public/test/content_browser_test_utils.cc
@@ -10,6 +10,7 @@
#include "base/run_loop.h"
#include "base/strings/pattern.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/web_contents.h"
@@ -25,9 +26,11 @@ namespace content {
base::FilePath GetTestFilePath(const char* dir, const char* file) {
base::FilePath path;
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_path_service;
PathService::Get(DIR_TEST_DATA, &path);
- return path.Append(base::FilePath().AppendASCII(dir).Append(
- base::FilePath().AppendASCII(file)));
+ if (dir)
+ path = path.AppendASCII(dir);
+ return path.AppendASCII(file);
}
GURL GetTestUrl(const char* dir, const char* file) {
« no previous file with comments | « content/public/test/content_browser_test_utils.h ('k') | content/renderer/dom_serializer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698