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

Unified Diff: chrome/browser/ui/search/local_ntp_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/ui/search/local_ntp_browsertest.cc
diff --git a/chrome/browser/ui/search/local_ntp_browsertest.cc b/chrome/browser/ui/search/local_ntp_browsertest.cc
index fbdd5aab1bbc2e353c2b465126cf86b2f9a8bc43..6e8fa4e108efaf24c3f9d2aa1c7f8962adc8069c 100644
--- a/chrome/browser/ui/search/local_ntp_browsertest.cc
+++ b/chrome/browser/ui/search/local_ntp_browsertest.cc
@@ -4,6 +4,7 @@
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/threading/thread_restrictions.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/search/search.h"
@@ -40,6 +41,7 @@ namespace {
// Switches the browser language to French, and returns true iff successful.
bool SwitchToFrench() {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
// Make sure the default language is not French.
std::string default_locale = g_browser_process->GetApplicationLocale();
EXPECT_NE("fr", default_locale);
@@ -305,6 +307,7 @@ IN_PROC_BROWSER_TEST_F(LocalNTPTest,
EXPECT_NE("fr", default_locale);
// Switch browser language to French.
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
std::string loaded_locale =
ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources("fr");
@@ -349,6 +352,7 @@ class LocalNTPSmokeTest : public InProcessBrowserTest {
}
void SetUserSelectedDefaultSearchProvider(const std::string& base_url) {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
TemplateURLData data;
data.SetShortName(base::UTF8ToUTF16(base_url));
data.SetKeyword(base::UTF8ToUTF16(base_url));

Powered by Google App Engine
This is Rietveld 408576698