| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/platform_thread.h" | 5 #include "base/platform_thread.h" |
| 6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
| 7 #include "chrome/common/url_constants.h" | 7 #include "chrome/common/url_constants.h" |
| 8 #include "chrome/test/automation/tab_proxy.h" | 8 #include "chrome/test/automation/tab_proxy.h" |
| 9 #include "chrome/test/automation/browser_proxy.h" | 9 #include "chrome/test/automation/browser_proxy.h" |
| 10 #include "chrome/test/ui/ui_test.h" | 10 #include "chrome/test/ui/ui_test.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 EXPECT_EQ(L"", GetTabTitle()); | 132 EXPECT_EQ(L"", GetTabTitle()); |
| 133 | 133 |
| 134 ASSERT_TRUE(tab_->GoForward()); | 134 ASSERT_TRUE(tab_->GoForward()); |
| 135 EXPECT_EQ(L"bot1", GetTabTitle()); | 135 EXPECT_EQ(L"bot1", GetTabTitle()); |
| 136 | 136 |
| 137 ASSERT_TRUE(tab_->GoForward()); | 137 ASSERT_TRUE(tab_->GoForward()); |
| 138 EXPECT_EQ(L"bot3", GetTabTitle()); | 138 EXPECT_EQ(L"bot3", GetTabTitle()); |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Test that back/forward works when navigating in subframes. | 141 // Test that back/forward works when navigating in subframes. |
| 142 // Fails on Windows. See crbug.com/TODO | |
| 143 #if defined(OS_WIN) | 142 #if defined(OS_WIN) |
| 143 // Flaky on Windows. See crbug.com/48833 |
| 144 #define MAYBE_FrameBackForward FLAKY_FrameBackForward | 144 #define MAYBE_FrameBackForward FLAKY_FrameBackForward |
| 145 #else | 145 #else |
| 146 #define MAYBE_FrameBackForward FrameBackForward | 146 #define MAYBE_FrameBackForward FrameBackForward |
| 147 #endif | 147 #endif |
| 148 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { | 148 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { |
| 149 ASSERT_TRUE(test_server_.Start()); | 149 ASSERT_TRUE(test_server_.Start()); |
| 150 | 150 |
| 151 // about:blank should be loaded first. | 151 // about:blank should be loaded first. |
| 152 GURL home(homepage_); | 152 GURL home(homepage_); |
| 153 ASSERT_FALSE(tab_->GoBack()); | 153 ASSERT_FALSE(tab_->GoBack()); |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 ASSERT_TRUE(tab_->GoBack()); | 535 ASSERT_TRUE(tab_->GoBack()); |
| 536 | 536 |
| 537 // Ensure history.length is properly truncated. | 537 // Ensure history.length is properly truncated. |
| 538 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); | 538 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); |
| 539 ASSERT_TRUE(tab_->ExecuteAndExtractInt( | 539 ASSERT_TRUE(tab_->ExecuteAndExtractInt( |
| 540 L"", L"domAutomationController.send(history.length)", &length)); | 540 L"", L"domAutomationController.send(history.length)", &length)); |
| 541 EXPECT_EQ(2, length); | 541 EXPECT_EQ(2, length); |
| 542 } | 542 } |
| 543 | 543 |
| 544 } // namespace | 544 } // namespace |
| OLD | NEW |