| Index: content/test/webui_resource_browsertest.cc
|
| diff --git a/content/test/webui_resource_browsertest.cc b/content/test/webui_resource_browsertest.cc
|
| index 2c239af060b08100fd1ff5ce46e6eeebbaf3c2c2..3731475af14e2f3996739c1b06ca1bed5e24a5a2 100644
|
| --- a/content/test/webui_resource_browsertest.cc
|
| +++ b/content/test/webui_resource_browsertest.cc
|
| @@ -6,6 +6,7 @@
|
| #include "base/files/file_util.h"
|
| #include "base/macros.h"
|
| #include "base/path_service.h"
|
| +#include "base/threading/thread_restrictions.h"
|
| #include "content/grit/content_resources.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/content_paths.h"
|
| @@ -25,7 +26,11 @@ class WebUIResourceBrowserTest : public ContentBrowserTest {
|
|
|
| // Runs all test functions in |file|, waiting for them to complete.
|
| void RunTest(const base::FilePath& file) {
|
| - ASSERT_TRUE(PathExists(file));
|
| + {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io_for_file_existance_check;
|
| + ASSERT_TRUE(PathExists(file));
|
| + }
|
| +
|
| NavigateToURL(shell(), net::FilePathToFileURL(file));
|
|
|
| content::WebContents* web_contents = shell()->web_contents();
|
| @@ -36,12 +41,7 @@ class WebUIResourceBrowserTest : public ContentBrowserTest {
|
| void RunMediaInternalsTest(const base::FilePath::CharType* file) {
|
| AddLibrary(IDR_WEBUI_JS_CR);
|
| AddLibrary(IDR_MEDIA_INTERNALS_JS);
|
| -
|
| - base::FilePath path;
|
| - PathService::Get(DIR_TEST_DATA, &path);
|
| - RunTest(path.Append(FILE_PATH_LITERAL("media"))
|
| - .Append(FILE_PATH_LITERAL("webui"))
|
| - .Append(file));
|
| + RunTest(GetTestFilePath("media", "webui").Append(file));
|
| }
|
|
|
| // Queues the library corresponding to |resource_id| for injection into the
|
|
|