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

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

Issue 6596005: Fix compiling on gcc-4.6.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/string16.h" 5 #include "base/string16.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/search_engines/template_url.h" 8 #include "chrome/browser/search_engines/template_url.h"
9 #include "chrome/browser/search_engines/template_url_model.h" 9 #include "chrome/browser/search_engines/template_url_model.h"
10 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h" 10 #include "chrome/browser/ui/search_engines/keyword_editor_controller.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ClearChangeCount(); 107 ClearChangeCount();
108 108
109 // If init is called twice, make sure that the controller is destroyed before 109 // If init is called twice, make sure that the controller is destroyed before
110 // the profile is. 110 // the profile is.
111 controller_.reset(); 111 controller_.reset();
112 profile_.reset(new TestingProfile()); 112 profile_.reset(new TestingProfile());
113 profile_->CreateTemplateURLModel(); 113 profile_->CreateTemplateURLModel();
114 114
115 model_ = profile_->GetTemplateURLModel(); 115 model_ = profile_->GetTemplateURLModel();
116 if (simulate_load_failure) 116 if (simulate_load_failure)
117 model_->OnWebDataServiceRequestDone(NULL, NULL); 117 model_->OnWebDataServiceRequestDone(0, NULL);
118 118
119 controller_.reset(new KeywordEditorController(profile_.get())); 119 controller_.reset(new KeywordEditorController(profile_.get()));
120 controller_->table_model()->SetObserver(this); 120 controller_->table_model()->SetObserver(this);
121 } 121 }
122 122
123 // Tests adding a TemplateURL. 123 // Tests adding a TemplateURL.
124 TEST_F(KeywordEditorControllerTest, Add) { 124 TEST_F(KeywordEditorControllerTest, Add) {
125 controller_->AddTemplateURL(kA, kB, "http://c"); 125 controller_->AddTemplateURL(kA, kB, "http://c");
126 126
127 // Verify the observer was notified. 127 // Verify the observer was notified.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 turl->set_short_name(ASCIIToUTF16("b")); 249 turl->set_short_name(ASCIIToUTF16("b"));
250 model_->Add(turl); 250 model_->Add(turl);
251 251
252 // Table model should have updated. 252 // Table model should have updated.
253 VerifyChangeCount(1, 0, 0, 0); 253 VerifyChangeCount(1, 0, 0, 0);
254 254
255 // And should contain the newly added TemplateURL. 255 // And should contain the newly added TemplateURL.
256 ASSERT_EQ(1, table_model()->RowCount()); 256 ASSERT_EQ(1, table_model()->RowCount());
257 ASSERT_EQ(0, table_model()->IndexOfTemplateURL(turl)); 257 ASSERT_EQ(0, table_model()->IndexOfTemplateURL(turl));
258 } 258 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | ppapi/proxy/ppb_context_3d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698