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

Side by Side Diff: components/suggestions/suggestions_store_unittest.cc

Issue 410673002: [Suggestions] Moving suggestions code to a new component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « components/suggestions/suggestions_store.cc ('k') | components/test/run_all_unittests.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/search/suggestions/suggestions_store.h" 5 #include "components/suggestions/suggestions_store.h"
6 6
7 #include "chrome/browser/search/suggestions/proto/suggestions.pb.h" 7 #include "components/pref_registry/testing_pref_service_syncable.h"
8 #include "chrome/test/base/testing_pref_service_syncable.h" 8 #include "components/suggestions/proto/suggestions.pb.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 using user_prefs::TestingPrefServiceSyncable;
12
11 namespace suggestions { 13 namespace suggestions {
12 14
13 namespace { 15 namespace {
14 16
15 const char kTestTitle[] = "Foo site"; 17 const char kTestTitle[] = "Foo site";
16 const char kTestUrl[] = "http://foo.com/"; 18 const char kTestUrl[] = "http://foo.com/";
17 19
18 SuggestionsProfile CreateTestSuggestions() { 20 SuggestionsProfile CreateTestSuggestions() {
19 SuggestionsProfile suggestions; 21 SuggestionsProfile suggestions;
20 ChromeSuggestion* suggestion = suggestions.add_suggestions(); 22 ChromeSuggestion* suggestion = suggestions.add_suggestions();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 EXPECT_TRUE(suggestions_store.LoadSuggestions(&recovered_suggestions)); 58 EXPECT_TRUE(suggestions_store.LoadSuggestions(&recovered_suggestions));
57 ValidateSuggestions(suggestions, recovered_suggestions); 59 ValidateSuggestions(suggestions, recovered_suggestions);
58 60
59 // Clear. 61 // Clear.
60 suggestions_store.ClearSuggestions(); 62 suggestions_store.ClearSuggestions();
61 EXPECT_FALSE(suggestions_store.LoadSuggestions(&recovered_suggestions)); 63 EXPECT_FALSE(suggestions_store.LoadSuggestions(&recovered_suggestions));
62 ValidateSuggestions(empty_suggestions, recovered_suggestions); 64 ValidateSuggestions(empty_suggestions, recovered_suggestions);
63 } 65 }
64 66
65 } // namespace suggestions 67 } // namespace suggestions
OLDNEW
« no previous file with comments | « components/suggestions/suggestions_store.cc ('k') | components/test/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698