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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_unittest.cc

Issue 366523002: Stop depending on chrome/browser/rlz/rlz.h from TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 6 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/search_engines/template_url_service.h" 5 #include "chrome/browser/search_engines/template_url_service.h"
6 #include "chrome/browser/search_engines/template_url_service_factory.h" 6 #include "chrome/browser/search_engines/template_url_service_factory.h"
7 #include "chrome/browser/ui/tabs/tab_strip_model.h" 7 #include "chrome/browser/ui/tabs/tab_strip_model.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/test/base/browser_with_test_window_test.h" 9 #include "chrome/test/base/browser_with_test_window_test.h"
10 #include "content/public/browser/navigation_entry.h" 10 #include "content/public/browser/navigation_entry.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // TemplateURLService is normally NULL during testing. Instant extended 50 // TemplateURLService is normally NULL during testing. Instant extended
51 // needs this service so set a custom factory function. 51 // needs this service so set a custom factory function.
52 TemplateURLServiceFactory::GetInstance()->SetTestingFactory( 52 TemplateURLServiceFactory::GetInstance()->SetTestingFactory(
53 profile, &BookmarkInstantExtendedTest::CreateTemplateURLService); 53 profile, &BookmarkInstantExtendedTest::CreateTemplateURLService);
54 return profile; 54 return profile;
55 } 55 }
56 56
57 private: 57 private:
58 static KeyedService* CreateTemplateURLService( 58 static KeyedService* CreateTemplateURLService(
59 content::BrowserContext* profile) { 59 content::BrowserContext* profile) {
60 return new TemplateURLService(static_cast<Profile*>(profile), NULL); 60 return new TemplateURLService(static_cast<Profile*>(profile), NULL,
61 base::Closure());
61 } 62 }
62 63
63 DISALLOW_COPY_AND_ASSIGN(BookmarkInstantExtendedTest); 64 DISALLOW_COPY_AND_ASSIGN(BookmarkInstantExtendedTest);
64 }; 65 };
65 66
66 // Verify that in instant extended mode the detached bookmark bar is visible on 67 // Verify that in instant extended mode the detached bookmark bar is visible on
67 // the new tab page. 68 // the new tab page.
68 TEST_F(BookmarkInstantExtendedTest, DetachedBookmarkBarOnNTP) { 69 TEST_F(BookmarkInstantExtendedTest, DetachedBookmarkBarOnNTP) {
69 AddTab(browser(), GURL(chrome::kChromeUINewTabURL)); 70 AddTab(browser(), GURL(chrome::kChromeUINewTabURL));
70 EXPECT_EQ(BookmarkBar::DETACHED, browser()->bookmark_bar_state()); 71 EXPECT_EQ(BookmarkBar::DETACHED, browser()->bookmark_bar_state());
71 } 72 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698