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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 timer.Start( 76 timer.Start(
77 FROM_HERE, 77 FROM_HERE,
78 base::TimeDelta::FromMilliseconds(15), 78 base::TimeDelta::FromMilliseconds(15),
79 base::Bind(&CheckAnimation, browser(), runner->QuitClosure())); 79 base::Bind(&CheckAnimation, browser(), runner->QuitClosure()));
80 runner->Run(); 80 runner->Run();
81 return base::Time::Now() - start; 81 return base::Time::Now() - start;
82 } 82 }
83 83
84 BookmarkModel* WaitForBookmarkModel(Profile* profile) { 84 BookmarkModel* WaitForBookmarkModel(Profile* profile) {
85 BookmarkModel* bookmark_model = 85 BookmarkModel* bookmark_model =
86 BookmarkModelFactory::GetForProfile(profile); 86 BookmarkModelFactory::GetForBrowserContext(profile);
87 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); 87 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model);
88 return bookmark_model; 88 return bookmark_model;
89 } 89 }
90 90
91 private: 91 private:
92 DISALLOW_COPY_AND_ASSIGN(BookmarkBrowsertest); 92 DISALLOW_COPY_AND_ASSIGN(BookmarkBrowsertest);
93 }; 93 };
94 94
95 // Test of bookmark bar toggling, visibility, and animation. 95 // Test of bookmark bar toggling, visibility, and animation.
96 IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, BookmarkBarVisibleWait) { 96 IN_PROC_BROWSER_TEST_F(BookmarkBrowsertest, BookmarkBarVisibleWait) {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 GURL error_url = https_server.GetURL("/"); 201 GURL error_url = https_server.GetURL("/");
202 ui_test_utils::NavigateToURL(browser(), error_url); 202 ui_test_utils::NavigateToURL(browser(), error_url);
203 web_contents = browser()->tab_strip_model()->GetActiveWebContents(); 203 web_contents = browser()->tab_strip_model()->GetActiveWebContents();
204 content::WaitForInterstitialAttach(web_contents); 204 content::WaitForInterstitialAttach(web_contents);
205 EXPECT_TRUE(web_contents->ShowingInterstitialPage()); 205 EXPECT_TRUE(web_contents->ShowingInterstitialPage());
206 EXPECT_FALSE(bookmark_delegate.is_starred()); 206 EXPECT_FALSE(bookmark_delegate.is_starred());
207 207
208 // The delegate is required to outlive the tab helper. 208 // The delegate is required to outlive the tab helper.
209 tab_helper->set_delegate(nullptr); 209 tab_helper->set_delegate(nullptr);
210 } 210 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/search/omnibox_result.cc ('k') | chrome/browser/ui/bookmarks/bookmark_context_menu_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698