| 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" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) { | 52 IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) { |
| 53 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 53 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 54 | 54 |
| 55 // Bring up the bookmarks manager tab. | 55 // Bring up the bookmarks manager tab. |
| 56 OpenBookmarksManager(); | 56 OpenBookmarksManager(); |
| 57 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 57 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 58 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); | 58 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 // TODO(linux_aura) http://crbug.com/163931 | 61 // TODO(linux_aura): http://crbug.com/163931 |
| 62 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) | 62 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 63 #define MAYBE_CommandAgainGoesBackToBookmarksTab DISABLED_CommandAgainGoesBackTo
BookmarksTab | 63 #define MAYBE_CommandAgainGoesBackToBookmarksTab \ |
| 64 DISABLED_CommandAgainGoesBackToBookmarksTab |
| 65 // Flaky on Mac: http://crbug.com/87200 |
| 66 #elif defined(OS_MACOSX) |
| 67 #define MAYBE_CommandAgainGoesBackToBookmarksTab \ |
| 68 DISABLED_CommandAgainGoesBackToBookmarksTab |
| 64 #else | 69 #else |
| 65 #define MAYBE_CommandAgainGoesBackToBookmarksTab CommandAgainGoesBackToBookmarks
Tab | 70 #define MAYBE_CommandAgainGoesBackToBookmarksTab \ |
| 71 CommandAgainGoesBackToBookmarksTab |
| 66 #endif | 72 #endif |
| 67 | 73 |
| 68 // If this flakes on Mac, use: http://crbug.com/87200 | |
| 69 IN_PROC_BROWSER_TEST_F(BookmarksTest, | 74 IN_PROC_BROWSER_TEST_F(BookmarksTest, |
| 70 MAYBE_CommandAgainGoesBackToBookmarksTab) { | 75 MAYBE_CommandAgainGoesBackToBookmarksTab) { |
| 71 ui_test_utils::NavigateToURL( | 76 ui_test_utils::NavigateToURL( |
| 72 browser(), | 77 browser(), |
| 73 ui_test_utils::GetTestUrl(base::FilePath(), | 78 ui_test_utils::GetTestUrl(base::FilePath(), |
| 74 base::FilePath().AppendASCII("simple.html"))); | 79 base::FilePath().AppendASCII("simple.html"))); |
| 75 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 80 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 76 | 81 |
| 77 // Bring up the bookmarks manager tab. | 82 // Bring up the bookmarks manager tab. |
| 78 OpenBookmarksManager(); | 83 OpenBookmarksManager(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 97 navigation_observer.Wait(); | 102 navigation_observer.Wait(); |
| 98 | 103 |
| 99 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 104 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 100 } | 105 } |
| 101 | 106 |
| 102 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { | 107 IN_PROC_BROWSER_TEST_F(BookmarksTest, BookmarksLoaded) { |
| 103 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); | 108 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIBookmarksURL)); |
| 104 ASSERT_EQ(1, browser()->tab_strip_model()->count()); | 109 ASSERT_EQ(1, browser()->tab_strip_model()->count()); |
| 105 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); | 110 AssertIsBookmarksPage(browser()->tab_strip_model()->GetActiveWebContents()); |
| 106 } | 111 } |
| OLD | NEW |