OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/automation_proxy.h" | 7 #include "chrome/test/automation/automation_proxy.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" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
139 ASSERT_FALSE(tab_->GoBack()); | 139 ASSERT_FALSE(tab_->GoBack()); |
140 EXPECT_EQ(L"about:blank", GetTabTitle()); | 140 EXPECT_EQ(L"about:blank", GetTabTitle()); |
141 | 141 |
142 ASSERT_TRUE(tab_->GoForward()); | 142 ASSERT_TRUE(tab_->GoForward()); |
143 EXPECT_EQ(L"bot1", GetTabTitle()); | 143 EXPECT_EQ(L"bot1", GetTabTitle()); |
144 | 144 |
145 ASSERT_TRUE(tab_->GoForward()); | 145 ASSERT_TRUE(tab_->GoForward()); |
146 EXPECT_EQ(L"bot3", GetTabTitle()); | 146 EXPECT_EQ(L"bot3", GetTabTitle()); |
147 } | 147 } |
148 | 148 |
149 #if defined(OS_WIN) | 149 #if defined(OS_WIN) || defined(OS_MAC) |
Nico
2011/12/01 16:50:31
It's OS_MAXOSX, not OS_MAC. Since there are no com
| |
150 // See http://crbug.com/61619 | 150 // See http://crbug.com/61619 |
151 #define MAYBE_FrameBackForward FLAKY_FrameBackForward | 151 #define MAYBE_FrameBackForward FLAKY_FrameBackForward |
152 #else | 152 #else |
153 #define MAYBE_FrameBackForward FrameBackForward | 153 #define MAYBE_FrameBackForward FrameBackForward |
154 #endif | 154 #endif |
155 | 155 |
156 // Test that back/forward works when navigating in subframes. | 156 // Test that back/forward works when navigating in subframes. |
157 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { | 157 TEST_F(SessionHistoryTest, MAYBE_FrameBackForward) { |
158 ASSERT_TRUE(test_server_.Start()); | 158 ASSERT_TRUE(test_server_.Start()); |
159 | 159 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
560 ASSERT_TRUE(tab_->GoBack()); | 560 ASSERT_TRUE(tab_->GoBack()); |
561 | 561 |
562 // Ensure history.length is properly truncated. | 562 // Ensure history.length is properly truncated. |
563 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); | 563 ASSERT_TRUE(tab_->NavigateToURL(test_server_.GetURL("files/title2.html"))); |
564 ASSERT_TRUE(tab_->ExecuteAndExtractInt( | 564 ASSERT_TRUE(tab_->ExecuteAndExtractInt( |
565 L"", L"domAutomationController.send(history.length)", &length)); | 565 L"", L"domAutomationController.send(history.length)", &length)); |
566 EXPECT_EQ(2, length); | 566 EXPECT_EQ(2, length); |
567 } | 567 } |
568 | 568 |
569 } // namespace | 569 } // namespace |
OLD | NEW |