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

Unified Diff: chrome/browser/importer/edge_importer_browsertest_win.cc

Issue 2835233002: Fix integration tests in src/chrome and src/extensions so that we can turn on IO thread checks wi... (Closed)
Patch Set: ready for review Created 3 years, 8 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
Index: chrome/browser/importer/edge_importer_browsertest_win.cc
diff --git a/chrome/browser/importer/edge_importer_browsertest_win.cc b/chrome/browser/importer/edge_importer_browsertest_win.cc
index 1f7bcace83ae8f473ba2ef6988ab2420ca957f53..65b7d904e06d87115ac9a88608781b321bbdbb14 100644
--- a/chrome/browser/importer/edge_importer_browsertest_win.cc
+++ b/chrome/browser/importer/edge_importer_browsertest_win.cc
@@ -203,8 +203,11 @@ IN_PROC_BROWSER_TEST_F(EdgeImporterBrowserTest, EdgeImporter) {
data_path = data_path.AppendASCII("edge_profile");
base::FilePath temp_path = temp_dir_.GetPath();
- ASSERT_TRUE(base::CopyDirectory(data_path, temp_path, true));
- ASSERT_TRUE(DecompressDatabase(temp_path.AppendASCII("edge_profile")));
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ ASSERT_TRUE(base::CopyDirectory(data_path, temp_path, true));
+ ASSERT_TRUE(DecompressDatabase(temp_path.AppendASCII("edge_profile")));
+ }
base::string16 key_path(importer::GetEdgeSettingsKey());
base::win::RegKey key;
@@ -243,8 +246,11 @@ IN_PROC_BROWSER_TEST_F(EdgeImporterBrowserTest, EdgeImporterLegacyFallback) {
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &data_path));
data_path = data_path.AppendASCII("edge_profile");
- ASSERT_TRUE(base::CopyDirectory(data_path, temp_dir_.GetPath(), true));
- ASSERT_TRUE(importer::IsEdgeFavoritesLegacyMode());
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ ASSERT_TRUE(base::CopyDirectory(data_path, temp_dir_.GetPath(), true));
+ ASSERT_TRUE(importer::IsEdgeFavoritesLegacyMode());
+ }
// Starts to import the above settings.
// Deletes itself.
@@ -256,10 +262,13 @@ IN_PROC_BROWSER_TEST_F(EdgeImporterBrowserTest, EdgeImporterLegacyFallback) {
importer::SourceProfile source_profile;
source_profile.importer_type = importer::TYPE_EDGE;
base::FilePath source_path = temp_dir_.GetPath().AppendASCII("edge_profile");
- ASSERT_NE(-1,
- base::WriteFile(
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ ASSERT_NE(
+ -1, base::WriteFile(
source_path.AppendASCII("Favorites\\Google.url:favicon:$DATA"),
kDummyFaviconImageData, sizeof(kDummyFaviconImageData)));
+ }
source_profile.source_path = source_path;
host->StartImportSettings(source_profile, browser()->profile(),
« no previous file with comments | « chrome/browser/history/redirect_browsertest.cc ('k') | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698