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

Unified Diff: chrome/browser/spellchecker/spellcheck_service_unittest.cc

Issue 17127002: Correctly integrate StoragePartition into TestingProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix InstantNTP test. Created 7 years, 5 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/spellchecker/spellcheck_service_unittest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_service_unittest.cc b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
index 1f688108caddc0462640f7f4ff32b44a8af5644b..c481af2a5ef4d27c417aa19b3d463d94f7438742 100644
--- a/chrome/browser/spellchecker/spellcheck_service_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_unittest.cc
@@ -11,11 +11,10 @@
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/common/spellcheck_common.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/public/test/test_browser_thread.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-using content::BrowserThread;
using chrome::spellcheck_common::WordList;
static BrowserContextKeyedService* BuildSpellcheckService(
@@ -25,27 +24,15 @@ static BrowserContextKeyedService* BuildSpellcheckService(
class SpellcheckServiceTest : public testing::Test {
protected:
- SpellcheckServiceTest()
- : ui_thread_(BrowserThread::UI, &message_loop_),
- file_thread_(BrowserThread::FILE, &message_loop_),
- profile_(new TestingProfile()) {
- }
-
virtual void SetUp() OVERRIDE {
// Use SetTestingFactoryAndUse to force creation and initialization.
SpellcheckServiceFactory::GetInstance()->SetTestingFactoryAndUse(
- profile_.get(), &BuildSpellcheckService);
+ &profile_, &BuildSpellcheckService);
}
- virtual void TearDown() OVERRIDE {
- base::MessageLoop::current()->RunUntilIdle();
- }
-
- base::MessageLoop message_loop_;
- content::TestBrowserThread ui_thread_;
- content::TestBrowserThread file_thread_;
-
- scoped_ptr<TestingProfile> profile_;
+ private:
+ content::TestBrowserThreadBundle thread_bundle_;
+ TestingProfile profile_;
};
TEST_F(SpellcheckServiceTest, GetSpellCheckLanguages1) {

Powered by Google App Engine
This is Rietveld 408576698