| 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 "chrome/test/ui/ui_test.h" | 5 #include "chrome/test/ui/ui_test.h" |
| 6 | 6 |
| 7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/chrome_pages.h" | 9 #include "chrome/browser/ui/chrome_pages.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) { | 53 IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) { |
| 54 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 54 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 55 | 55 |
| 56 // Bring up the bookmarks manager tab. | 56 // Bring up the bookmarks manager tab. |
| 57 OpenBookmarksManager(); | 57 OpenBookmarksManager(); |
| 58 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 58 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 59 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); | 59 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); |
| 60 } | 60 } |
| 61 | 61 |
| 62 // TODO(linux_aura) http://crbug.com/163931 |
| 63 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 64 #define MAYBE_CommandAgainGoesBackToBookmarksTab DISABLED_CommandAgainGoesBackTo
BookmarksTab |
| 65 #else |
| 66 #define MAYBE_CommandAgainGoesBackToBookmarksTab CommandAgainGoesBackToBookmarks
Tab |
| 67 #endif |
| 68 |
| 62 // If this flakes on Mac, use: http://crbug.com/87200 | 69 // If this flakes on Mac, use: http://crbug.com/87200 |
| 63 IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandAgainGoesBackToBookmarksTab) { | 70 IN_PROC_BROWSER_TEST_F(BookmarksTest, |
| 71 MAYBE_CommandAgainGoesBackToBookmarksTab) { |
| 64 ui_test_utils::NavigateToURL( | 72 ui_test_utils::NavigateToURL( |
| 65 browser(), | 73 browser(), |
| 66 ui_test_utils::GetTestUrl(base::FilePath(), | 74 ui_test_utils::GetTestUrl(base::FilePath(), |
| 67 base::FilePath().AppendASCII("simple.html"))); | 75 base::FilePath().AppendASCII("simple.html"))); |
| 68 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 76 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 69 | 77 |
| 70 // Bring up the bookmarks manager tab. | 78 // Bring up the bookmarks manager tab. |
| 71 OpenBookmarksManager(); | 79 OpenBookmarksManager(); |
| 72 ASSERT_EQ(2, browser()->tab_strip_model()->count()); | 80 ASSERT_EQ(2, browser()->tab_strip_model()->count()); |
| 73 | 81 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 90 navigation_observer.Wait(); | 98 navigation_observer.Wait(); |
| 91 | 99 |
| 92 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 100 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 93 } | 101 } |
| 94 | 102 |
| 95 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { | 103 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { |
| 96 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); | 104 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); |
| 97 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 105 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 98 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); | 106 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); |
| 99 } | 107 } |
| OLD | NEW |