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

Side by Side Diff: chrome/browser/chrome_content_browser_client_unittest.cc

Issue 2290503003: Remove use of stl_util in search_engines. (Closed)
Patch Set: ios for reals Created 4 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 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <list> 7 #include <list>
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 profile(), &TemplateURLServiceFactory::BuildInstanceFor); 309 profile(), &TemplateURLServiceFactory::BuildInstanceFor);
310 TemplateURLService* template_url_service = 310 TemplateURLService* template_url_service =
311 TemplateURLServiceFactory::GetForProfile(browser()->profile()); 311 TemplateURLServiceFactory::GetForProfile(browser()->profile());
312 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); 312 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service);
313 313
314 TemplateURLData data; 314 TemplateURLData data;
315 data.SetShortName(base::ASCIIToUTF16("foo.com")); 315 data.SetShortName(base::ASCIIToUTF16("foo.com"));
316 data.SetURL("http://foo.com/url?bar={searchTerms}"); 316 data.SetURL("http://foo.com/url?bar={searchTerms}");
317 data.new_tab_url = new_tab_page_url.spec(); 317 data.new_tab_url = new_tab_page_url.spec();
318 TemplateURL* template_url = new TemplateURL(data); 318 TemplateURL* template_url = new TemplateURL(data);
319 // Takes ownership. 319 // Takes ownership.
Peter Kasting 2016/08/31 04:12:55 Nit: Comment is now redundant.
Avi (use Gerrit) 2016/09/01 00:34:25 Done.
320 template_url_service->Add(template_url); 320 template_url_service->Add(base::WrapUnique(template_url));
321 template_url_service->SetUserSelectedDefaultSearchProvider(template_url); 321 template_url_service->SetUserSelectedDefaultSearchProvider(template_url);
322 } 322 }
323 323
324 std::unique_ptr<base::FieldTrialList> field_trial_list_; 324 std::unique_ptr<base::FieldTrialList> field_trial_list_;
325 }; 325 };
326 326
327 TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) { 327 TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) {
328 const GURL url_original("chrome://newtab"); 328 const GURL url_original("chrome://newtab");
329 const GURL url_rewritten("https://www.example.com/newtab"); 329 const GURL url_rewritten("https://www.example.com/newtab");
330 InstallTemplateURLWithNewTabPage(url_rewritten); 330 InstallTemplateURLWithNewTabPage(url_rewritten);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 client.ClearSiteData( 710 client.ClearSiteData(
711 profile(), origin, true /* cookies */, false /* storage */, 711 profile(), origin, true /* cookies */, false /* storage */,
712 true /* cache */, 712 true /* cache */,
713 base::Bind( 713 base::Bind(
714 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, 714 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished,
715 base::Unretained(this), true)); 715 base::Unretained(this), true));
716 EXPECT_TRUE(IsClearingFinished()); 716 EXPECT_TRUE(IsClearingFinished());
717 } 717 }
718 718
719 } // namespace 719 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698