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

Unified Diff: chrome/browser/ui/app_list/search/mixer_unittest.cc

Issue 621823004: Simplifies the structure of app_list search a bit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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/ui/app_list/search/mixer.cc ('k') | chrome/browser/ui/app_list/search/omnibox_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/mixer_unittest.cc
diff --git a/chrome/browser/ui/app_list/search/mixer_unittest.cc b/chrome/browser/ui/app_list/search/mixer_unittest.cc
index 38ca5dbdce6599d11db8811fc87d3e094a3b1485..12fdc18bc604c2d67405771a1ff77e8d0244194e 100644
--- a/chrome/browser/ui/app_list/search/mixer_unittest.cc
+++ b/chrome/browser/ui/app_list/search/mixer_unittest.cc
@@ -8,17 +8,17 @@
#include "base/strings/string16.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/ui/app_list/search/chrome_search_result.h"
#include "chrome/browser/ui/app_list/search/history_types.h"
#include "chrome/browser/ui/app_list/search/mixer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/app_list/app_list_model.h"
#include "ui/app_list/search_provider.h"
+#include "ui/app_list/search_result.h"
namespace app_list {
namespace test {
-class TestSearchResult : public ChromeSearchResult {
+class TestSearchResult : public SearchResult {
public:
TestSearchResult(const std::string& id, double relevance)
: instance_id_(instantiation_count++) {
@@ -28,15 +28,11 @@ class TestSearchResult : public ChromeSearchResult {
}
virtual ~TestSearchResult() {}
- // ChromeSearchResult overides:
+ // SearchResult overrides:
virtual void Open(int event_flags) override {}
virtual void InvokeAction(int action_index, int event_flags) override {}
- virtual scoped_ptr<ChromeSearchResult> Duplicate() override {
- return scoped_ptr<ChromeSearchResult>(
- new TestSearchResult(id(), relevance())).Pass();
- }
- virtual ChromeSearchResultType GetType() override {
- return SEARCH_RESULT_TYPE_BOUNDARY;
+ virtual scoped_ptr<SearchResult> Duplicate() override {
+ return scoped_ptr<SearchResult>(new TestSearchResult(id(), relevance()));
}
// For reference equality testing. (Addresses cannot be used to test reference
@@ -196,12 +192,12 @@ TEST_F(MixerTest, RemoveDuplicates) {
}
TEST_F(MixerTest, Publish) {
- scoped_ptr<ChromeSearchResult> result1(new TestSearchResult("app1", 0));
- scoped_ptr<ChromeSearchResult> result2(new TestSearchResult("app2", 0));
- scoped_ptr<ChromeSearchResult> result3(new TestSearchResult("app3", 0));
- scoped_ptr<ChromeSearchResult> result3_copy = result3->Duplicate();
- scoped_ptr<ChromeSearchResult> result4(new TestSearchResult("app4", 0));
- scoped_ptr<ChromeSearchResult> result5(new TestSearchResult("app5", 0));
+ scoped_ptr<SearchResult> result1(new TestSearchResult("app1", 0));
+ scoped_ptr<SearchResult> result2(new TestSearchResult("app2", 0));
+ scoped_ptr<SearchResult> result3(new TestSearchResult("app3", 0));
+ scoped_ptr<SearchResult> result3_copy = result3->Duplicate();
+ scoped_ptr<SearchResult> result4(new TestSearchResult("app4", 0));
+ scoped_ptr<SearchResult> result5(new TestSearchResult("app5", 0));
AppListModel::SearchResults ui_results;
« no previous file with comments | « chrome/browser/ui/app_list/search/mixer.cc ('k') | chrome/browser/ui/app_list/search/omnibox_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698