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

Unified Diff: chrome/browser/prefs/pref_service_browsertest.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/prefs/pref_service_browsertest.cc
diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc
index 8f1eec4295235d4c1984049a33a3cb301c0f9153..f65bbb94b0f08b42008772d77c2dfa667b7920eb 100644
--- a/chrome/browser/prefs/pref_service_browsertest.cc
+++ b/chrome/browser/prefs/pref_service_browsertest.cc
@@ -10,6 +10,7 @@
#include "base/json/json_file_value_serializer.h"
#include "base/path_service.h"
#include "base/test/test_file_util.h"
+#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/ui/browser.h"
@@ -87,7 +88,11 @@ IN_PROC_BROWSER_TEST_F(PreferenceServiceTest, Test) {
// The window should open with the new reference profile, with window
// placement values stored in the user data directory.
JSONFileValueDeserializer deserializer(original_pref_file_);
- std::unique_ptr<base::Value> root = deserializer.Deserialize(NULL, NULL);
+ std::unique_ptr<base::Value> root;
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ root = deserializer.Deserialize(NULL, NULL);
+ }
ASSERT_TRUE(root.get());
ASSERT_TRUE(root->IsType(base::Value::Type::DICTIONARY));
« no previous file with comments | « chrome/browser/prefs/pref_functional_browsertest.cc ('k') | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698