summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/history/redirect_uitest.cc5
-rw-r--r--chrome/browser/session_history_uitest.cc3
-rw-r--r--chrome/browser/unload_uitest.cc61
3 files changed, 39 insertions, 30 deletions
diff --git a/chrome/browser/history/redirect_uitest.cc b/chrome/browser/history/redirect_uitest.cc
index a94000e..b2d4fb8 100644
--- a/chrome/browser/history/redirect_uitest.cc
+++ b/chrome/browser/history/redirect_uitest.cc
@@ -138,9 +138,7 @@ TEST_F(RedirectTest, DISABLED_ClientCancelled) {
}
// Tests a client->server->server redirect
-// TODO(creis): This is disabled temporarily while I figure out why it is
-// failing.
-TEST_F(RedirectTest, DISABLED_ClientServerServer) {
+TEST_F(RedirectTest, ClientServerServer) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
ASSERT_TRUE(NULL != server.get());
@@ -243,6 +241,7 @@ TEST_F(RedirectTest, ClientFragments) {
// alternatively load the second page from disk, but we would need to start
// the browser for this testcase with --process-per-tab, and I don't think
// we can do this at test-case-level granularity at the moment.
+// http://crbug.com/45056
TEST_F(RedirectTest,
DISABLED_ClientCancelledByNewNavigationAfterProvisionalLoad) {
// We want to initiate a second navigation after the provisional load for
diff --git a/chrome/browser/session_history_uitest.cc b/chrome/browser/session_history_uitest.cc
index 830f9be..7fc93f5 100644
--- a/chrome/browser/session_history_uitest.cc
+++ b/chrome/browser/session_history_uitest.cc
@@ -268,6 +268,7 @@ TEST_F(SessionHistoryTest, FrameFormBackForward) {
// document state"
// Test that back/forward preserves POST data and document state when navigating
// across frames (ie, from frame -> nonframe).
+// http://crbug.com/45058
TEST_F(SessionHistoryTest, DISABLED_CrossFrameFormBackForward) {
scoped_refptr<HTTPTestServer> server =
HTTPTestServer::CreateServer(kDocRoot, NULL);
@@ -466,7 +467,7 @@ TEST_F(SessionHistoryTest, JavascriptHistory) {
}
// This test is failing consistently. See http://crbug.com/22560
-TEST_F(SessionHistoryTest, DISABLED_LocationReplace) {
+TEST_F(SessionHistoryTest, FAILS_LocationReplace) {
// Test that using location.replace doesn't leave the title of the old page
// visible.
scoped_refptr<HTTPTestServer> server =
diff --git a/chrome/browser/unload_uitest.cc b/chrome/browser/unload_uitest.cc
index d83ff25..89f3964 100644
--- a/chrome/browser/unload_uitest.cc
+++ b/chrome/browser/unload_uitest.cc
@@ -85,9 +85,9 @@ const std::string TWO_SECOND_BEFORE_UNLOAD_ALERT_HTML =
const std::string CLOSE_TAB_WHEN_OTHER_TAB_HAS_LISTENER =
"<html><head><title>only_one_unload</title></head>"
- "<body onload=\"window.open('data:text/html,"
+ "<body onclick=\"window.open('data:text/html,"
"<html><head><title>popup</title></head></body>')\" "
- "onbeforeunload='return;'"
+ "onbeforeunload='return;'>"
"</body></html>";
class UnloadTest : public UITest {
@@ -292,6 +292,7 @@ TEST_F(UnloadTest, BrowserCloseUnload) {
#define BrowserCloseWithInnerFocusedFrame \
DISABLED_BrowserCloseWithInnerFocusedFrame
#endif
+
// Tests closing the browser with a beforeunload handler and clicking
// OK in the beforeunload confirm dialog.
TEST_F(UnloadTest, BrowserCloseBeforeUnloadOK) {
@@ -396,42 +397,50 @@ TEST_F(UnloadTest, BrowserCloseTwoSecondBeforeUnloadAlert) {
L"twosecondbeforeunloadalert");
}
-// TODO(brettw) bug 12913 this test was broken by WebKit merge 42202:44252.
-// Apparently popup titles are broken somehow.
+#if defined(OS_MACOSX)
+// http://crbug.com/45162
+#define MAYBE_BrowserCloseTabWhenOtherTabHasListener \
+ DISABLED_BrowserCloseTabWhenOtherTabHasListener
+#elif defined(OS_WINDOWS)
+// http://crbug.com/45281
+#define MAYBE_BrowserCloseTabWhenOtherTabHasListener \
+ DISABLED_BrowserCloseTabWhenOtherTabHasListener
+#else
+#define MAYBE_BrowserCloseTabWhenOtherTabHasListener \
+ BrowserCloseTabWhenOtherTabHasListener
+#endif
// Tests that if there's a renderer process with two tabs, one of which has an
// unload handler, and the other doesn't, the tab that doesn't have an unload
-// handler can be closed. If this test fails, the Close() call will hang.
-TEST_F(UnloadTest, DISABLED_BrowserCloseTabWhenOtherTabHasListener) {
+// handler can be closed.
+TEST_F(UnloadTest, MAYBE_BrowserCloseTabWhenOtherTabHasListener) {
NavigateToDataURL(CLOSE_TAB_WHEN_OTHER_TAB_HAS_LISTENER, L"only_one_unload");
- int window_count;
- ASSERT_TRUE(automation()->GetBrowserWindowCount(&window_count));
- ASSERT_EQ(2, window_count);
-
- scoped_refptr<BrowserProxy> popup_browser_proxy(
- automation()->GetBrowserWindow(1));
- ASSERT_TRUE(popup_browser_proxy.get());
- int popup_tab_count;
- EXPECT_TRUE(popup_browser_proxy->GetTabCount(&popup_tab_count));
- EXPECT_EQ(1, popup_tab_count);
- scoped_refptr<TabProxy> popup_tab(popup_browser_proxy->GetActiveTab());
+
+ scoped_refptr<BrowserProxy> browser = automation()->GetBrowserWindow(0);
+ ASSERT_TRUE(browser.get());
+ scoped_refptr<WindowProxy> window = browser->GetWindow();
+ ASSERT_TRUE(window.get());
+
+ gfx::Rect tab_view_bounds;
+ ASSERT_TRUE(window->GetViewBounds(VIEW_ID_TAB_CONTAINER,
+ &tab_view_bounds, true));
+ // Simulate a click to force user_gesture to true; if we don't, the resulting
+ // popup will be constrained, which isn't what we want to test.
+ ASSERT_TRUE(window->SimulateOSClick(tab_view_bounds.CenterPoint(),
+ views::Event::EF_LEFT_BUTTON_DOWN));
+ ASSERT_TRUE(browser->WaitForTabCountToBecome(2, action_timeout_ms()));
+
+ scoped_refptr<TabProxy> popup_tab(browser->GetActiveTab());
ASSERT_TRUE(popup_tab.get());
std::wstring popup_title;
- ASSERT_TRUE(popup_tab.get() != NULL);
EXPECT_TRUE(popup_tab->GetTabTitle(&popup_title));
EXPECT_EQ(std::wstring(L"popup"), popup_title);
EXPECT_TRUE(popup_tab->Close(true));
- scoped_refptr<BrowserProxy> main_browser_proxy(
- automation()->GetBrowserWindow(0));
- ASSERT_TRUE(main_browser_proxy.get());
- int main_tab_count;
- EXPECT_TRUE(main_browser_proxy->GetTabCount(&main_tab_count));
- EXPECT_EQ(1, main_tab_count);
- scoped_refptr<TabProxy> main_tab(main_browser_proxy->GetActiveTab());
+ ASSERT_TRUE(browser->WaitForTabCountToBecome(1, action_timeout_ms()));
+ scoped_refptr<TabProxy> main_tab(browser->GetActiveTab());
ASSERT_TRUE(main_tab.get());
std::wstring main_title;
- ASSERT_TRUE(main_tab.get() != NULL);
EXPECT_TRUE(main_tab->GetTabTitle(&main_title));
EXPECT_EQ(std::wstring(L"only_one_unload"), main_title);
}