summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 21:51:45 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-13 21:51:45 +0000
commitd2c017a6aad8fac222c9e7b891b7ffab51cb396e (patch)
tree7efcc41416d158e9a4abd3e6eeb4b0baf9f517c5 /chrome/test
parent2364d40fd0483bb7250e36db041fe31ab4472e66 (diff)
downloadchromium_src-d2c017a6aad8fac222c9e7b891b7ffab51cb396e.zip
chromium_src-d2c017a6aad8fac222c9e7b891b7ffab51cb396e.tar.gz
chromium_src-d2c017a6aad8fac222c9e7b891b7ffab51cb396e.tar.bz2
Tests for KeywordEditorView.
BUG=1324185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@828 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/testing_profile.cc4
-rw-r--r--chrome/test/testing_profile.h9
-rw-r--r--chrome/test/unit/unittests.vcproj8
3 files changed, 20 insertions, 1 deletions
diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
index c1c3fe8..d18a75d 100644
--- a/chrome/test/testing_profile.cc
+++ b/chrome/test/testing_profile.cc
@@ -71,3 +71,7 @@ void TestingProfile::DestroyHistoryService() {
void TestingProfile::CreateBookmarkBarModel() {
bookmark_bar_model_.reset(new BookmarkBarModel(this));
}
+
+void TestingProfile::CreateTemplateURLModel() {
+ template_url_model_.reset(new TemplateURLModel(this));
+}
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index f6b01b5..05df5e5 100644
--- a/chrome/test/testing_profile.h
+++ b/chrome/test/testing_profile.h
@@ -37,6 +37,7 @@
#include "chrome/browser/browser_prefs.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/template_url_model.h"
#include "chrome/common/pref_service.h"
class TestingProfile : public Profile {
@@ -51,6 +52,9 @@ class TestingProfile : public Profile {
// NULL.
void CreateBookmarkBarModel();
+ // Creates a TemplateURLModel. If not invoked the TemplateURLModel is NULL.
+ void CreateTemplateURLModel();
+
virtual std::wstring GetPath() {
return std::wstring();
}
@@ -90,7 +94,7 @@ class TestingProfile : public Profile {
return prefs_.get();
}
virtual TemplateURLModel* GetTemplateURLModel() {
- return NULL;
+ return template_url_model_.get();
}
virtual TemplateURLFetcher* GetTemplateURLFetcher() {
return NULL;
@@ -183,6 +187,9 @@ class TestingProfile : public Profile {
// The BookmarkBarModel. Only created if CreateBookmarkBarModel is invoked.
scoped_ptr<BookmarkBarModel> bookmark_bar_model_;
+ // The TemplateURLFetcher. Only created if CreateTemplateURLModel is invoked.
+ scoped_ptr<TemplateURLModel> template_url_model_;
+
// Do we have a history service? This defaults to the value of
// history_service, but can be explicitly set.
bool has_history_service_;
diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj
index 095d594..9aa1c90 100644
--- a/chrome/test/unit/unittests.vcproj
+++ b/chrome/test/unit/unittests.vcproj
@@ -427,6 +427,14 @@
</File>
</Filter>
<Filter
+ Name="TestKeywordEditorView"
+ >
+ <File
+ RelativePath="..\..\browser\views\keyword_editor_view_unittest.cc"
+ >
+ </File>
+ </Filter>
+ <Filter
Name="TestJPEGCodec"
>
<File