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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_delegate_unittest.cc

Issue 338363004: Remove Profile* from TemplateURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/profile_resetter/automatic_profile_resetter_delegate.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 data.new_tab_url = "http://example.com/newtab.html"; 199 data.new_tab_url = "http://example.com/newtab.html";
200 data.alternate_urls.push_back("http://example.com/s?q={searchTerms}"); 200 data.alternate_urls.push_back("http://example.com/s?q={searchTerms}");
201 201
202 data.short_name = base::ASCIIToUTF16("name"); 202 data.short_name = base::ASCIIToUTF16("name");
203 data.SetKeyword(base::ASCIIToUTF16("keyword")); 203 data.SetKeyword(base::ASCIIToUTF16("keyword"));
204 data.search_terms_replacement_key = "search-terms-replacment-key"; 204 data.search_terms_replacement_key = "search-terms-replacment-key";
205 data.prepopulate_id = 42; 205 data.prepopulate_id = 42;
206 data.input_encodings.push_back("UTF-8"); 206 data.input_encodings.push_back("UTF-8");
207 data.safe_for_autoreplace = true; 207 data.safe_for_autoreplace = true;
208 208
209 return scoped_ptr<TemplateURL>(new TemplateURL(profile(), data)); 209 return scoped_ptr<TemplateURL>(new TemplateURL(data));
210 } 210 }
211 211
212 void ExpectNoPendingBrandcodedConfigFetch() { 212 void ExpectNoPendingBrandcodedConfigFetch() {
213 EXPECT_FALSE(test_url_fetcher_factory_.GetFetcherByID(0)); 213 EXPECT_FALSE(test_url_fetcher_factory_.GetFetcherByID(0));
214 } 214 }
215 215
216 void ExpectAndServicePendingBrandcodedConfigFetch(bool simulate_failure) { 216 void ExpectAndServicePendingBrandcodedConfigFetch(bool simulate_failure) {
217 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0); 217 net::TestURLFetcher* fetcher = test_url_fetcher_factory_.GetFetcherByID(0);
218 ASSERT_TRUE(fetcher); 218 ASSERT_TRUE(fetcher);
219 EXPECT_THAT(fetcher->upload_data(), 219 EXPECT_THAT(fetcher->upload_data(),
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 if (ProfileResetGlobalError::IsSupportedOnPlatform()) 596 if (ProfileResetGlobalError::IsSupportedOnPlatform())
597 ExpectResetPromptState(true /*active*/); 597 ExpectResetPromptState(true /*active*/);
598 else 598 else
599 ExpectResetPromptState(false /*active*/); 599 ExpectResetPromptState(false /*active*/);
600 resetter_delegate()->DismissPrompt(); 600 resetter_delegate()->DismissPrompt();
601 ExpectResetPromptState(false /*active*/); 601 ExpectResetPromptState(false /*active*/);
602 resetter_delegate()->DismissPrompt(); 602 resetter_delegate()->DismissPrompt();
603 } 603 }
604 604
605 } // namespace 605 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698