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

Unified Diff: content/test/ppapi/ppapi_test.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/test/content_browser_test_test.cc ('k') | content/test/webui_resource_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/ppapi/ppapi_test.cc
diff --git a/content/test/ppapi/ppapi_test.cc b/content/test/ppapi/ppapi_test.cc
index 929f0ee3e582a21334b011c689d33252be776b0b..c5fef56b61d6a2e8cbee2295f002468ec2f6d065 100644
--- a/content/test/ppapi/ppapi_test.cc
+++ b/content/test/ppapi/ppapi_test.cc
@@ -10,6 +10,7 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_switches.h"
@@ -60,13 +61,18 @@ void PPAPITestBase::SetUpCommandLine(base::CommandLine* command_line) {
GURL PPAPITestBase::GetTestFileUrl(const std::string& test_case) {
base::FilePath test_path;
- EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path));
- test_path = test_path.Append(FILE_PATH_LITERAL("ppapi"));
- test_path = test_path.Append(FILE_PATH_LITERAL("tests"));
- test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html"));
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_test_setup;
+
+ EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_path));
+ test_path = test_path.Append(FILE_PATH_LITERAL("ppapi"));
+ test_path = test_path.Append(FILE_PATH_LITERAL("tests"));
+ test_path = test_path.Append(FILE_PATH_LITERAL("test_case.html"));
+
+ // Sanity check the file name.
+ EXPECT_TRUE(base::PathExists(test_path));
+ }
- // Sanity check the file name.
- EXPECT_TRUE(base::PathExists(test_path));
GURL test_url = net::FilePathToFileURL(test_path);
GURL::Replacements replacements;
« no previous file with comments | « content/test/content_browser_test_test.cc ('k') | content/test/webui_resource_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698