| Index: chrome/browser/profiles/profile_browsertest.cc
|
| diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc
|
| index dd3f2bf98578faeba1fa6be180ded644d57c5401..20b97e601d15b19432433c41c727e2667446fc08 100644
|
| --- a/chrome/browser/profiles/profile_browsertest.cc
|
| +++ b/chrome/browser/profiles/profile_browsertest.cc
|
| @@ -19,6 +19,7 @@
|
| #include "base/sequenced_task_runner.h"
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/task_scheduler/task_scheduler.h"
|
| +#include "base/threading/thread_restrictions.h"
|
| #include "base/values.h"
|
| #include "base/version.h"
|
| #include "build/build_config.h"
|
| @@ -342,6 +343,7 @@ class ProfileBrowserTest : public InProcessBrowserTest {
|
| // Test OnProfileCreate is called with is_new_profile set to true when
|
| // creating a new profile synchronously.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, CreateNewProfileSynchronous) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -367,6 +369,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, CreateNewProfileSynchronous) {
|
| // Test OnProfileCreate is called with is_new_profile set to false when
|
| // creating a profile synchronously with an existing prefs file.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, CreateOldProfileSynchronous) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| CreatePrefsFileInDirectory(temp_dir.GetPath());
|
| @@ -388,6 +391,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, CreateOldProfileSynchronous) {
|
| // creating a new profile asynchronously.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| DISABLED_CreateNewProfileAsynchronous) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -422,6 +426,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| // creating a profile asynchronously with an existing prefs file.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| DISABLED_CreateOldProfileAsynchronous) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
| CreatePrefsFileInDirectory(temp_dir.GetPath());
|
| @@ -448,6 +453,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| // Flaky: http://crbug.com/393177
|
| // Test that a README file is created for profiles that didn't have it.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_ProfileReadmeCreated) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -475,6 +481,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DISABLED_ProfileReadmeCreated) {
|
|
|
| // Test that repeated setting of exit type is handled correctly.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, ExitType) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -566,6 +573,7 @@ void CompareURLRequestContexts(
|
| } // namespace
|
|
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, URLRequestContextIsolation) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -601,6 +609,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, URLRequestContextIsolation) {
|
|
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| OffTheRecordURLRequestContextIsolation) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -666,6 +675,7 @@ std::string GetExitTypePreferenceFromDisk(Profile* profile) {
|
|
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| WritesProfilesSynchronouslyOnEndSession) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::ScopedTempDir temp_dir;
|
| ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
|
|
|
| @@ -777,6 +787,7 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest,
|
| // Verifies the cache directory supports multiple profiles when it's overriden
|
| // by group policy or command line switches.
|
| IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, DiskCacheDirOverride) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| int size;
|
| const base::FilePath::StringPieceType profile_name =
|
| FILE_PATH_LITERAL("Profile 1");
|
|
|