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

Unified Diff: chrome/browser/spellchecker/spellcheck_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
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/spellchecker/spellcheck_service_browsertest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index 0c3895af3d36afab27f459c2a2452f5a6afe1048..21fe47ebf2c0376d167f6e66390b21445d10c939 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/synchronization/waitable_event.h"
+#include "base/threading/thread_restrictions.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
@@ -269,10 +270,13 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT) {
base::FilePath bdict_path =
spellcheck::GetVersionedFileName("en-US", dict_dir);
- size_t actual = base::WriteFile(bdict_path,
- reinterpret_cast<const char*>(kCorruptedBDICT),
- arraysize(kCorruptedBDICT));
- EXPECT_EQ(arraysize(kCorruptedBDICT), actual);
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
+ size_t actual = base::WriteFile(
+ bdict_path, reinterpret_cast<const char*>(kCorruptedBDICT),
+ arraysize(kCorruptedBDICT));
+ EXPECT_EQ(arraysize(kCorruptedBDICT), actual);
+ }
// Attach an event to the SpellcheckService object so we can receive its
// status updates.
@@ -304,6 +308,7 @@ IN_PROC_BROWSER_TEST_F(SpellcheckServiceBrowserTest, DeleteCorruptedBDICT) {
content::RunAllPendingInMessageLoop(content::BrowserThread::UI);
EXPECT_EQ(SpellcheckService::BDICT_CORRUPTED,
SpellcheckService::GetStatusEvent());
+ base::ThreadRestrictions::ScopedAllowIO allow_io;
if (base::PathExists(bdict_path)) {
ADD_FAILURE();
EXPECT_TRUE(base::DeleteFile(bdict_path, true));
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698