| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/app/chrome_dll_resource.h" | 5 #include "chrome/app/chrome_dll_resource.h" |
| 6 #include "chrome/common/url_constants.h" | 6 #include "chrome/common/url_constants.h" |
| 7 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" | 7 #include "chrome/test/automated_ui_tests/automated_ui_test_base.h" |
| 8 #include "chrome/test/automation/browser_proxy.h" | 8 #include "chrome/test/automation/browser_proxy.h" |
| 9 #include "chrome/test/automation/tab_proxy.h" | 9 #include "chrome/test/automation/tab_proxy.h" |
| 10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
| 11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
| 13 | 13 |
| 14 #if defined(OS_MACOSX) | 14 #if defined(OS_MACOSX) |
| 15 // The window pops up, but doesn't close. | 15 // The window pops up, but doesn't close. |
| 16 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow | 16 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow |
| 17 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ | 17 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ |
| 18 DISABLED_OpenCloseBrowserWindowWithAccelerator | 18 DISABLED_OpenCloseBrowserWindowWithAccelerator |
| 19 #else | 19 #else |
| 20 // http://code.google.com/p/chromium/issues/detail?id=14731 | 20 // http://code.google.com/p/chromium/issues/detail?id=14731 |
| 21 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow | 21 #define MAYBE_IncognitoWindow DISABLED_IncognitoWindow |
| 22 // http://crbug.com/19394 | 22 // http://crbug.com/19394 |
| 23 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ | 23 #define MAYBE_OpenCloseBrowserWindowWithAccelerator \ |
| 24 DISABLED_OpenCloseBrowserWindowWithAccelerator | 24 DISABLED_OpenCloseBrowserWindowWithAccelerator |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 // http://code.google.com/p/chromium/issues/detail?id=14774 | 27 // http://code.google.com/p/chromium/issues/detail?id=14774 |
| 28 #if defined(OS_WIN) && !defined(NDEBUG) | 28 #if defined(OS_WIN) && !defined(NDEBUG) |
| 29 #define MAYBE_CloseTab DISABLED_CloseTab | 29 #define MAYBE_CloseTab DISABLED_CloseTab |
| 30 #define MAYBE_CloseBrowserWindow DISABLED_CloseBrowserWindow | |
| 31 #else | 30 #else |
| 32 #define MAYBE_CloseTab CloseTab | 31 #define MAYBE_CloseTab CloseTab |
| 33 #define MAYBE_CloseBrowserWindow CloseBrowserWindow | |
| 34 #endif | 32 #endif |
| 35 | 33 |
| 36 // Automation pieces are not implemented for these on platforms other than | 34 // Automation pieces are not implemented for these on platforms other than |
| 37 // Windows. | 35 // Windows. |
| 38 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 39 #define MAYBE_ShowBookmarkBar ShowBookmarkBar | 37 #define MAYBE_ShowBookmarkBar ShowBookmarkBar |
| 40 #else | 38 #else |
| 41 #define MAYBE_ShowBookmarkBar DISABLED_ShowBookmarkBar | 39 #define MAYBE_ShowBookmarkBar DISABLED_ShowBookmarkBar |
| 42 #endif | 40 #endif |
| 43 | 41 |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 CloseBrowser(browser_1.get(), &application_closed); | 194 CloseBrowser(browser_1.get(), &application_closed); |
| 197 ASSERT_FALSE(application_closed); | 195 ASSERT_FALSE(application_closed); |
| 198 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); | 196 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); |
| 199 ASSERT_EQ(2, num_browser_windows); | 197 ASSERT_EQ(2, num_browser_windows); |
| 200 CloseBrowser(browser_2.get(), &application_closed); | 198 CloseBrowser(browser_2.get(), &application_closed); |
| 201 ASSERT_FALSE(application_closed); | 199 ASSERT_FALSE(application_closed); |
| 202 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); | 200 ASSERT_TRUE(automation()->GetBrowserWindowCount(&num_browser_windows)); |
| 203 ASSERT_EQ(1, num_browser_windows); | 201 ASSERT_EQ(1, num_browser_windows); |
| 204 } | 202 } |
| 205 | 203 |
| 206 TEST_F(AutomatedUITestBase, MAYBE_CloseBrowserWindow) { | 204 // http://code.google.com/p/chromium/issues/detail?id=14774 |
| 205 TEST_F(AutomatedUITestBase, FLAKY_CloseBrowserWindow) { |
| 207 int tab_count; | 206 int tab_count; |
| 208 NewTab(); | 207 NewTab(); |
| 209 active_browser()->GetTabCount(&tab_count); | 208 active_browser()->GetTabCount(&tab_count); |
| 210 ASSERT_EQ(2, tab_count); | 209 ASSERT_EQ(2, tab_count); |
| 211 | 210 |
| 212 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL)); | 211 ASSERT_TRUE(OpenAndActivateNewBrowserWindow(NULL)); |
| 213 NewTab(); | 212 NewTab(); |
| 214 NewTab(); | 213 NewTab(); |
| 215 active_browser()->GetTabCount(&tab_count); | 214 active_browser()->GetTabCount(&tab_count); |
| 216 ASSERT_EQ(3, tab_count); | 215 ASSERT_EQ(3, tab_count); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); | 394 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); |
| 396 ASSERT_EQ(GURL(chrome::kChromeUIDownloadsURL), url); | 395 ASSERT_EQ(GURL(chrome::kChromeUIDownloadsURL), url); |
| 397 } | 396 } |
| 398 | 397 |
| 399 TEST_F(AutomatedUITestBase, ShowHistory) { | 398 TEST_F(AutomatedUITestBase, ShowHistory) { |
| 400 ASSERT_TRUE(ShowHistory()); | 399 ASSERT_TRUE(ShowHistory()); |
| 401 GURL url; | 400 GURL url; |
| 402 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); | 401 ASSERT_TRUE(GetActiveTab()->GetCurrentURL(&url)); |
| 403 ASSERT_EQ(GURL(chrome::kChromeUIHistoryURL), url); | 402 ASSERT_EQ(GURL(chrome::kChromeUIHistoryURL), url); |
| 404 } | 403 } |
| OLD | NEW |