| 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/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "chrome/common/url_constants.h" | 6 #include "chrome/common/url_constants.h" |
| 7 #include "chrome/test/automation/tab_proxy.h" | 7 #include "chrome/test/automation/tab_proxy.h" |
| 8 #include "chrome/test/automation/browser_proxy.h" | 8 #include "chrome/test/automation/browser_proxy.h" |
| 9 #include "chrome/test/ui/ui_test.h" | 9 #include "chrome/test/ui/ui_test.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 ASSERT_FALSE(tab_->GoBack()); | 137 ASSERT_FALSE(tab_->GoBack()); |
| 138 EXPECT_EQ(L"", GetTabTitle()); | 138 EXPECT_EQ(L"", GetTabTitle()); |
| 139 | 139 |
| 140 ASSERT_TRUE(tab_->GoForward()); | 140 ASSERT_TRUE(tab_->GoForward()); |
| 141 EXPECT_EQ(L"bot1", GetTabTitle()); | 141 EXPECT_EQ(L"bot1", GetTabTitle()); |
| 142 | 142 |
| 143 ASSERT_TRUE(tab_->GoForward()); | 143 ASSERT_TRUE(tab_->GoForward()); |
| 144 EXPECT_EQ(L"bot3", GetTabTitle()); | 144 EXPECT_EQ(L"bot3", GetTabTitle()); |
| 145 } | 145 } |
| 146 | 146 |
| 147 #if defined(OS_WIN) |
| 148 // See http://crbug.com/61619 |
| 149 #define MAYBE_FrameBackForward FLAKY_FrameBackForward |
| 150 #else |
| 151 #define MAYBE_FrameBackForward FrameBackForward |
| 152 #endif |
| 153 |
| 147 // Test that back/forward works when navigating in subframes. | 154 // Test that back/forward works when navigating in subframes. |
| 148 // Flaky, http://crbug.com/61619 and http://crbug.com/70883. | 155 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { |
| 149 TEST_F(SessionHistoryTest, FLAKY_FrameBackForward) { | |
| 150 ASSERT_TRUE(test_server_.Start()); | 156 ASSERT_TRUE(test_server_.Start()); |
| 151 | 157 |
| 152 // about:blank should be loaded first. | 158 // about:blank should be loaded first. |
| 153 GURL home(homepage()); | 159 GURL home(homepage()); |
| 154 ASSERT_FALSE(tab_->GoBack()); | 160 ASSERT_FALSE(tab_->GoBack()); |
| 155 EXPECT_EQ(L"", GetTabTitle()); | 161 EXPECT_EQ(L"", GetTabTitle()); |
| 156 EXPECT_EQ(home, GetTabURL()); | 162 EXPECT_EQ(home, GetTabURL()); |
| 157 | 163 |
| 158 GURL frames(test_server_.GetURL("files/session_history/frames.html")); | 164 GURL frames(test_server_.GetURL("files/session_history/frames.html")); |
| 159 ASSERT_TRUE(tab_->NavigateToURL(frames)); | 165 ASSERT_TRUE(tab_->NavigateToURL(frames)); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 ASSERT_TRUE(tab_->GoBack()); | 564 ASSERT_TRUE(tab_->GoBack()); |
| 559 | 565 |
| 560 // Ensure history.length is properly truncated. | 566 // Ensure history.length is properly truncated. |
| 561 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); | 567 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); |
| 562 ASSERT_TRUE(tab_->ExecuteAndExtractInt( | 568 ASSERT_TRUE(tab_->ExecuteAndExtractInt( |
| 563 L"", L"domAutomationController.send(history.length)", &length)); | 569 L"", L"domAutomationController.send(history.length)", &length)); |
| 564 EXPECT_EQ(2, length); | 570 EXPECT_EQ(2, length); |
| 565 } | 571 } |
| 566 | 572 |
| 567 } // namespace | 573 } // namespace |
| OLD | NEW |