| Index: chrome/browser/extensions/extension_browsertest.cc
|
| diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
|
| index 1aa8bd631886c3ec4ba8b382353c62064ba22c4a..b425a4437800b8419780f6e871c8cc0f90aaf0e8 100644
|
| --- a/chrome/browser/extensions/extension_browsertest.cc
|
| +++ b/chrome/browser/extensions/extension_browsertest.cc
|
| @@ -18,6 +18,7 @@
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/task_scheduler/post_task.h"
|
| +#include "base/threading/thread_restrictions.h"
|
| #include "build/build_config.h"
|
| #include "chrome/browser/extensions/browsertest_util.h"
|
| #include "chrome/browser/extensions/chrome_test_extension_loader.h"
|
| @@ -149,6 +150,7 @@ Profile* ExtensionBrowserTest::profile() {
|
| const Extension* ExtensionBrowserTest::GetExtensionByPath(
|
| const extensions::ExtensionSet& extensions,
|
| const base::FilePath& path) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::FilePath extension_path = base::MakeAbsoluteFilePath(path);
|
| EXPECT_TRUE(!extension_path.empty());
|
| for (const scoped_refptr<const Extension>& extension : extensions) {
|
| @@ -252,6 +254,7 @@ const Extension* ExtensionBrowserTest::LoadExtensionAsComponentWithManifest(
|
| profile())->extension_service();
|
| ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
|
|
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| std::string manifest;
|
| if (!base::ReadFileToString(path.Append(manifest_relative_path), &manifest)) {
|
| return NULL;
|
| @@ -292,6 +295,7 @@ const Extension* ExtensionBrowserTest::LoadAndLaunchApp(
|
|
|
| base::FilePath ExtensionBrowserTest::PackExtension(
|
| const base::FilePath& dir_path) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| base::FilePath crx_path = temp_dir_.GetPath().AppendASCII("temp.crx");
|
| if (!base::DeleteFile(crx_path, false)) {
|
| ADD_FAILURE() << "Failed to delete crx: " << crx_path.value();
|
| @@ -320,6 +324,7 @@ base::FilePath ExtensionBrowserTest::PackExtensionWithOptions(
|
| const base::FilePath& crx_path,
|
| const base::FilePath& pem_path,
|
| const base::FilePath& pem_out_path) {
|
| + base::ThreadRestrictions::ScopedAllowIO allow_io;
|
| if (!base::PathExists(dir_path)) {
|
| ADD_FAILURE() << "Extension dir not found: " << dir_path.value();
|
| return base::FilePath();
|
|
|