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

Unified Diff: chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc

Issue 9834056: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed unchanged file Created 8 years, 9 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_engines/keyword_editor_controller_unittest.cc
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
index 70ba2ac162ab66219afe143fd77a7ecf2fb6879f..e7eff7dc465d2a573866956edc9083ce66017353 100644
--- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
#include "chrome/browser/ui/search_engines/template_url_table_model.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_pref_service.h"
@@ -30,6 +31,8 @@ static const string16 kB1(ASCIIToUTF16("b1"));
class KeywordEditorControllerTest : public testing::Test,
public ui::TableModelObserver {
public:
+ KeywordEditorControllerTest() {}
+
// Initializes all of the state.
void Init(bool simulate_load_failure);
@@ -94,6 +97,12 @@ class KeywordEditorControllerTest : public testing::Test,
return controller_->table_model();
}
+ // Build no service.
+ static scoped_refptr<RefcountedProfileKeyedService> BuildNull(
+ Profile* profile) {
+ return NULL;
+ }
+
protected:
MessageLoopForUI message_loop_;
scoped_ptr<TestingProfile> profile_;
@@ -115,6 +124,9 @@ void KeywordEditorControllerTest::Init(bool simulate_load_failure) {
profile_.reset(new TestingProfile());
profile_->CreateTemplateURLService();
+ WebDataServiceFactory::GetInstance()->SetTestingFactory(
+ profile_.get(), KeywordEditorControllerTest::BuildNull);
+
model_ = TemplateURLServiceFactory::GetForProfile(profile_.get());
if (simulate_load_failure)
model_->OnWebDataServiceRequestDone(0, NULL);

Powered by Google App Engine
This is Rietveld 408576698