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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view_browsertest.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 years, 4 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/ui/views/toolbar/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 DISABLED_ToolbarCycleFocusWithBookmarkBar 106 DISABLED_ToolbarCycleFocusWithBookmarkBar
107 #else 107 #else
108 #define MAYBE_ToolbarCycleFocusWithBookmarkBar ToolbarCycleFocusWithBookmarkBar 108 #define MAYBE_ToolbarCycleFocusWithBookmarkBar ToolbarCycleFocusWithBookmarkBar
109 #endif 109 #endif
110 IN_PROC_BROWSER_TEST_F(ToolbarViewTest, 110 IN_PROC_BROWSER_TEST_F(ToolbarViewTest,
111 MAYBE_ToolbarCycleFocusWithBookmarkBar) { 111 MAYBE_ToolbarCycleFocusWithBookmarkBar) {
112 CommandUpdater* updater = browser()->command_controller()->command_updater(); 112 CommandUpdater* updater = browser()->command_controller()->command_updater();
113 updater->ExecuteCommand(IDC_SHOW_BOOKMARK_BAR); 113 updater->ExecuteCommand(IDC_SHOW_BOOKMARK_BAR);
114 114
115 BookmarkModel* model = 115 BookmarkModel* model =
116 BookmarkModelFactory::GetForProfile(browser()->profile()); 116 BookmarkModelFactory::GetForBrowserContext(browser()->profile());
117 bookmarks::AddIfNotBookmarked( 117 bookmarks::AddIfNotBookmarked(
118 model, GURL("http://foo.com"), base::ASCIIToUTF16("Foo")); 118 model, GURL("http://foo.com"), base::ASCIIToUTF16("Foo"));
119 119
120 // We want to specifically test the case where the bookmark bar is 120 // We want to specifically test the case where the bookmark bar is
121 // already showing when a window opens, so create a second browser 121 // already showing when a window opens, so create a second browser
122 // window with the same profile. 122 // window with the same profile.
123 Browser* second_browser = CreateBrowser(browser()->profile()); 123 Browser* second_browser = CreateBrowser(browser()->profile());
124 RunToolbarCycleFocusTest(second_browser); 124 RunToolbarCycleFocusTest(second_browser);
125 } 125 }
126 126
127 } // namespace 127 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | chrome/browser/ui/webui/browsing_history_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698