| 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/test/test_timeouts.h" | 5 #include "base/test/test_timeouts.h" |
| 6 #include "chrome/browser/ui/browser.h" | 6 #include "chrome/browser/ui/browser.h" |
| 7 #include "chrome/browser/ui/chrome_pages.h" | 7 #include "chrome/browser/ui/chrome_pages.h" |
| 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 8 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 9 #include "chrome/common/url_constants.h" | 9 #include "chrome/common/url_constants.h" |
| 10 #include "chrome/test/base/in_process_browser_test.h" | 10 #include "chrome/test/base/in_process_browser_test.h" |
| 11 #include "chrome/test/base/ui_test_utils.h" | 11 #include "chrome/test/base/ui_test_utils.h" |
| 12 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 #include "content/public/test/browser_test_utils.h" | 14 #include "content/public/test/browser_test_utils.h" |
| 15 #include "content/public/test/test_navigation_observer.h" | 15 #include "content/public/test/test_navigation_observer.h" |
| 16 | 16 |
| 17 class BookmarksTest : public InProcessBrowserTest { | 17 class BookmarksTest : public InProcessBrowserTest { |
| 18 public: | 18 public: |
| 19 BookmarksTest() {} | 19 BookmarksTest() { |
| 20 set_run_accessibility_checks(true); |
| 21 } |
| 20 | 22 |
| 21 void OpenBookmarksManager() { | 23 void OpenBookmarksManager() { |
| 22 content::TestNavigationObserver navigation_observer( | 24 content::TestNavigationObserver navigation_observer( |
| 23 browser()->tab_strip_model()->GetActiveWebContents(), 2); | 25 browser()->tab_strip_model()->GetActiveWebContents(), 2); |
| 24 navigation_observer.StartWatchingNewWebContents(); | 26 navigation_observer.StartWatchingNewWebContents(); |
| 25 | 27 |
| 26 // Bring up the bookmarks manager tab. | 28 // Bring up the bookmarks manager tab. |
| 27 chrome::ShowBookmarkManager(browser()); | 29 chrome::ShowBookmarkManager(browser()); |
| 28 navigation_observer.Wait(); | 30 navigation_observer.Wait(); |
| 29 } | 31 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 navigation_observer.Wait(); | 100 navigation_observer.Wait(); |
| 99 | 101 |
| 100 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 102 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 101 } | 103 } |
| 102 | 104 |
| 103 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { | 105 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { |
| 104 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); | 106 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); |
| 105 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 107 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 106 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); | 108 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); |
| 107 } | 109 } |
| OLD | NEW |