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

Side by Side Diff: chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/strings/string16.h" 6 #include "base/strings/string16.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search_engines/template_url_service_factory_test_util.h " 9 #include "chrome/browser/search_engines/template_url_service_factory_test_util.h "
10 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" 10 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
11 #include "chrome/browser/ui/search_engines/template_url_table_model.h" 11 #include "chrome/browser/ui/search_engines/template_url_table_model.h"
12 #include "chrome/test/base/testing_pref_service_syncable.h"
13 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
14 #include "components/search_engines/template_url.h" 13 #include "components/search_engines/template_url.h"
15 #include "components/search_engines/template_url_service.h" 14 #include "components/search_engines/template_url_service.h"
15 #include "components/syncable_prefs/testing_pref_service_syncable.h"
16 #include "content/public/test/test_browser_thread_bundle.h" 16 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "ui/base/models/table_model_observer.h" 18 #include "ui/base/models/table_model_observer.h"
19 19
20 using base::ASCIIToUTF16; 20 using base::ASCIIToUTF16;
21 21
22 static const base::string16 kA(ASCIIToUTF16("a")); 22 static const base::string16 kA(ASCIIToUTF16("a"));
23 static const base::string16 kA1(ASCIIToUTF16("a1")); 23 static const base::string16 kA1(ASCIIToUTF16("a1"));
24 static const base::string16 kB(ASCIIToUTF16("b")); 24 static const base::string16 kB(ASCIIToUTF16("b"));
25 static const base::string16 kB1(ASCIIToUTF16("b1")); 25 static const base::string16 kB1(ASCIIToUTF16("b1"));
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 TemplateURL* turl = new TemplateURL(data); 247 TemplateURL* turl = new TemplateURL(data);
248 util()->model()->Add(turl); 248 util()->model()->Add(turl);
249 249
250 // Table model should have updated. 250 // Table model should have updated.
251 VerifyChangeCount(1, 0, 0, 0); 251 VerifyChangeCount(1, 0, 0, 0);
252 252
253 // And should contain the newly added TemplateURL. 253 // And should contain the newly added TemplateURL.
254 ASSERT_EQ(original_row_count + 1, table_model()->RowCount()); 254 ASSERT_EQ(original_row_count + 1, table_model()->RowCount());
255 ASSERT_GE(table_model()->IndexOfTemplateURL(turl), 0); 255 ASSERT_GE(table_model()->IndexOfTemplateURL(turl), 0);
256 } 256 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698