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

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: fix broken test 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( 306 TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse(
307 profile(), &TemplateURLServiceFactory::BuildInstanceFor); 307 profile(), &TemplateURLServiceFactory::BuildInstanceFor);
308 TemplateURLService* template_url_service = 308 TemplateURLService* template_url_service =
309 TemplateURLServiceFactory::GetForProfile(browser()->profile()); 309 TemplateURLServiceFactory::GetForProfile(browser()->profile());
310 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service); 310 search_test_utils::WaitForTemplateURLServiceToLoad(template_url_service);
311 311
312 TemplateURLData data; 312 TemplateURLData data;
313 data.SetShortName(base::ASCIIToUTF16("foo.com")); 313 data.SetShortName(base::ASCIIToUTF16("foo.com"));
314 data.SetURL("http://foo.com/url?bar={searchTerms}"); 314 data.SetURL("http://foo.com/url?bar={searchTerms}");
315 data.new_tab_url = new_tab_page_url.spec(); 315 data.new_tab_url = new_tab_page_url.spec();
316 TemplateURL* template_url = new TemplateURL(data); 316 TemplateURL* template_url =
317 // Takes ownership. 317 template_url_service->Add(base::MakeUnique<TemplateURL>(data));
318 template_url_service->Add(template_url);
319 template_url_service->SetUserSelectedDefaultSearchProvider(template_url); 318 template_url_service->SetUserSelectedDefaultSearchProvider(template_url);
320 } 319 }
321 320
322 std::unique_ptr<base::FieldTrialList> field_trial_list_; 321 std::unique_ptr<base::FieldTrialList> field_trial_list_;
323 }; 322 };
324 323
325 TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) { 324 TEST_F(InstantNTPURLRewriteTest, UberURLHandler_InstantExtendedNewTabPage) {
326 const GURL url_original("chrome://newtab"); 325 const GURL url_original("chrome://newtab");
327 const GURL url_rewritten("https://www.example.com/newtab"); 326 const GURL url_rewritten("https://www.example.com/newtab");
328 InstallTemplateURLWithNewTabPage(url_rewritten); 327 InstallTemplateURLWithNewTabPage(url_rewritten);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
708 client.ClearSiteData( 707 client.ClearSiteData(
709 profile(), origin, true /* cookies */, false /* storage */, 708 profile(), origin, true /* cookies */, false /* storage */,
710 true /* cache */, 709 true /* cache */,
711 base::Bind( 710 base::Bind(
712 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished, 711 &ChromeContentBrowserClientClearSiteDataTest::SetClearingFinished,
713 base::Unretained(this), true)); 712 base::Unretained(this), true));
714 EXPECT_TRUE(IsClearingFinished()); 713 EXPECT_TRUE(IsClearingFinished());
715 } 714 }
716 715
717 } // namespace 716 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698