| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |