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 | |
154 // Test that back/forward works when navigating in subframes. | 147 // Test that back/forward works when navigating in subframes. |
155 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { | 148 // Flaky, http://crbug.com/61619 and http://crbug.com/70883. |
| 149 TEST_F(SessionHistoryTest, FLAKY_FrameBackForward) { |
156 ASSERT_TRUE(test_server_.Start()); | 150 ASSERT_TRUE(test_server_.Start()); |
157 | 151 |
158 // about:blank should be loaded first. | 152 // about:blank should be loaded first. |
159 GURL home(homepage()); | 153 GURL home(homepage()); |
160 ASSERT_FALSE(tab_->GoBack()); | 154 ASSERT_FALSE(tab_->GoBack()); |
161 EXPECT_EQ(L"", GetTabTitle()); | 155 EXPECT_EQ(L"", GetTabTitle()); |
162 EXPECT_EQ(home, GetTabURL()); | 156 EXPECT_EQ(home, GetTabURL()); |
163 | 157 |
164 GURL frames(test_server_.GetURL("files/session_history/frames.html")); | 158 GURL frames(test_server_.GetURL("files/session_history/frames.html")); |
165 ASSERT_TRUE(tab_->NavigateToURL(frames)); | 159 ASSERT_TRUE(tab_->NavigateToURL(frames)); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 ASSERT_TRUE(tab_->GoBack()); | 558 ASSERT_TRUE(tab_->GoBack()); |
565 | 559 |
566 // Ensure history.length is properly truncated. | 560 // Ensure history.length is properly truncated. |
567 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); | 561 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); |
568 ASSERT_TRUE(tab_->ExecuteAndExtractInt( | 562 ASSERT_TRUE(tab_->ExecuteAndExtractInt( |
569 L"", L"domAutomationController.send(history.length)", &length)); | 563 L"", L"domAutomationController.send(history.length)", &length)); |
570 EXPECT_EQ(2, length); | 564 EXPECT_EQ(2, length); |
571 } | 565 } |
572 | 566 |
573 } // namespace | 567 } // namespace |
OLD | NEW |