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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 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
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 11 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/search_engines/template_url_service_factory.h" 13 #include "chrome/browser/search_engines/template_url_service_factory.h"
14 #include "chrome/browser/ui/app_list/app_list_util.h" 14 #include "chrome/browser/ui/app_list/app_list_util.h"
15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h" 15 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view_test_helper.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "chrome/common/url_constants.h" 17 #include "chrome/common/url_constants.h"
18 #include "chrome/test/base/browser_with_test_window_test.h" 18 #include "chrome/test/base/browser_with_test_window_test.h"
19 #include "chrome/test/base/scoped_testing_local_state.h" 19 #include "chrome/test/base/scoped_testing_local_state.h"
20 #include "chrome/test/base/testing_browser_process.h" 20 #include "chrome/test/base/testing_browser_process.h"
21 #include "chrome/test/base/testing_pref_service_syncable.h"
22 #include "components/bookmarks/browser/bookmark_model.h" 21 #include "components/bookmarks/browser/bookmark_model.h"
23 #include "components/bookmarks/test/bookmark_test_helpers.h" 22 #include "components/bookmarks/test/bookmark_test_helpers.h"
24 #include "components/search_engines/search_terms_data.h" 23 #include "components/search_engines/search_terms_data.h"
25 #include "components/search_engines/template_url_service.h" 24 #include "components/search_engines/template_url_service.h"
26 #include "components/search_engines/template_url_service_client.h" 25 #include "components/search_engines/template_url_service_client.h"
26 #include "components/syncable_prefs/testing_pref_service_syncable.h"
27 #include "ui/views/controls/button/label_button.h" 27 #include "ui/views/controls/button/label_button.h"
28 #include "ui/views/controls/button/menu_button.h" 28 #include "ui/views/controls/button/menu_button.h"
29 29
30 using bookmarks::BookmarkModel; 30 using bookmarks::BookmarkModel;
31 using bookmarks::BookmarkNode; 31 using bookmarks::BookmarkNode;
32 32
33 class BookmarkBarViewTest : public BrowserWithTestWindowTest { 33 class BookmarkBarViewTest : public BrowserWithTestWindowTest {
34 public: 34 public:
35 BookmarkBarViewTest() {} 35 BookmarkBarViewTest() {}
36 36
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, 342 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
343 new base::FundamentalValue(false)); 343 new base::FundamentalValue(false));
344 EXPECT_FALSE(test_helper_->apps_page_shortcut()->visible()); 344 EXPECT_FALSE(test_helper_->apps_page_shortcut()->visible());
345 345
346 // And try showing it via policy too. 346 // And try showing it via policy too.
347 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar, 347 prefs->SetManagedPref(bookmarks::prefs::kShowAppsShortcutInBookmarkBar,
348 new base::FundamentalValue(true)); 348 new base::FundamentalValue(true));
349 EXPECT_TRUE(test_helper_->apps_page_shortcut()->visible()); 349 EXPECT_TRUE(test_helper_->apps_page_shortcut()->visible());
350 } 350 }
351 #endif 351 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698