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

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

Issue 681823004: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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"
(...skipping 27 matching lines...) Expand all
38 removed_count_(0) {} 38 removed_count_(0) {}
39 39
40 explicit KeywordEditorControllerTest(bool simulate_load_failure) 40 explicit KeywordEditorControllerTest(bool simulate_load_failure)
41 : util_(&profile_), 41 : util_(&profile_),
42 simulate_load_failure_(simulate_load_failure), 42 simulate_load_failure_(simulate_load_failure),
43 model_changed_count_(0), 43 model_changed_count_(0),
44 items_changed_count_(0), 44 items_changed_count_(0),
45 added_count_(0), 45 added_count_(0),
46 removed_count_(0) {} 46 removed_count_(0) {}
47 47
48 virtual void SetUp() override { 48 void SetUp() override {
49 if (simulate_load_failure_) 49 if (simulate_load_failure_)
50 util_.model()->OnWebDataServiceRequestDone(0, NULL); 50 util_.model()->OnWebDataServiceRequestDone(0, NULL);
51 else 51 else
52 util_.VerifyLoad(); 52 util_.VerifyLoad();
53 53
54 controller_.reset(new KeywordEditorController(&profile_)); 54 controller_.reset(new KeywordEditorController(&profile_));
55 controller_->table_model()->SetObserver(this); 55 controller_->table_model()->SetObserver(this);
56 } 56 }
57 57
58 virtual void TearDown() override { 58 void TearDown() override { controller_.reset(); }
59 controller_.reset();
60 }
61 59
62 void OnModelChanged() override { model_changed_count_++; } 60 void OnModelChanged() override { model_changed_count_++; }
63 61
64 void OnItemsChanged(int start, int length) override { 62 void OnItemsChanged(int start, int length) override {
65 items_changed_count_++; 63 items_changed_count_++;
66 } 64 }
67 65
68 void OnItemsAdded(int start, int length) override { added_count_++; } 66 void OnItemsAdded(int start, int length) override { added_count_++; }
69 67
70 void OnItemsRemoved(int start, int length) override { removed_count_++; } 68 void OnItemsRemoved(int start, int length) override { removed_count_++; }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 TemplateURL* turl = new TemplateURL(data); 247 TemplateURL* turl = new TemplateURL(data);
250 util()->model()->Add(turl); 248 util()->model()->Add(turl);
251 249
252 // Table model should have updated. 250 // Table model should have updated.
253 VerifyChangeCount(1, 0, 0, 0); 251 VerifyChangeCount(1, 0, 0, 0);
254 252
255 // And should contain the newly added TemplateURL. 253 // And should contain the newly added TemplateURL.
256 ASSERT_EQ(original_row_count + 1, table_model()->RowCount()); 254 ASSERT_EQ(original_row_count + 1, table_model()->RowCount());
257 ASSERT_GE(table_model()->IndexOfTemplateURL(turl), 0); 255 ASSERT_GE(table_model()->IndexOfTemplateURL(turl), 0);
258 } 256 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('k') | chrome/browser/ui/settings_window_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698