| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 EXPECT_EQ(controller.GetLastCommittedEntryIndex(), -1); | 348 EXPECT_EQ(controller.GetLastCommittedEntryIndex(), -1); |
| 349 EXPECT_EQ(controller.GetPendingEntryIndex(), -1); | 349 EXPECT_EQ(controller.GetPendingEntryIndex(), -1); |
| 350 EXPECT_FALSE(controller.GetLastCommittedEntry()); | 350 EXPECT_FALSE(controller.GetLastCommittedEntry()); |
| 351 ASSERT_TRUE(controller.GetPendingEntry()); | 351 ASSERT_TRUE(controller.GetPendingEntry()); |
| 352 EXPECT_EQ(controller.GetPendingEntry(), controller.GetActiveEntry()); | 352 EXPECT_EQ(controller.GetPendingEntry(), controller.GetActiveEntry()); |
| 353 EXPECT_EQ(controller.GetPendingEntry(), controller.GetVisibleEntry()); | 353 EXPECT_EQ(controller.GetPendingEntry(), controller.GetVisibleEntry()); |
| 354 EXPECT_FALSE(controller.CanGoBack()); | 354 EXPECT_FALSE(controller.CanGoBack()); |
| 355 EXPECT_FALSE(controller.CanGoForward()); | 355 EXPECT_FALSE(controller.CanGoForward()); |
| 356 EXPECT_EQ(contents()->GetMaxPageID(), -1); | 356 EXPECT_EQ(contents()->GetMaxPageID(), -1); |
| 357 | 357 |
| 358 // The timestamp should not have been set yet. | 358 // Neither the timestamp nor the status code should have been set yet. |
| 359 EXPECT_TRUE(controller.GetPendingEntry()->GetTimestamp().is_null()); | 359 EXPECT_TRUE(controller.GetPendingEntry()->GetTimestamp().is_null()); |
| 360 EXPECT_EQ(0, controller.GetPendingEntry()->GetHttpStatusCode()); |
| 360 | 361 |
| 361 // We should have gotten no notifications from the preceeding checks. | 362 // We should have gotten no notifications from the preceeding checks. |
| 362 EXPECT_EQ(0U, notifications.size()); | 363 EXPECT_EQ(0U, notifications.size()); |
| 363 | 364 |
| 364 test_rvh()->SendNavigate(0, url1); | 365 test_rvh()->SendNavigate(0, url1); |
| 365 EXPECT_EQ(1U, navigation_entry_committed_counter_); | 366 EXPECT_EQ(1U, navigation_entry_committed_counter_); |
| 366 navigation_entry_committed_counter_ = 0; | 367 navigation_entry_committed_counter_ = 0; |
| 367 | 368 |
| 368 // The load should now be committed. | 369 // The load should now be committed. |
| 369 EXPECT_EQ(controller.GetEntryCount(), 1); | 370 EXPECT_EQ(controller.GetEntryCount(), 1); |
| (...skipping 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3951 PAGE_TRANSITION_LINK); | 3952 PAGE_TRANSITION_LINK); |
| 3952 session_helper_.AssertNavigationEquals(nav, | 3953 session_helper_.AssertNavigationEquals(nav, |
| 3953 windows_[0]->tabs[0]->navigations[0]); | 3954 windows_[0]->tabs[0]->navigations[0]); |
| 3954 nav.set_url(url2); | 3955 nav.set_url(url2); |
| 3955 session_helper_.AssertNavigationEquals(nav, | 3956 session_helper_.AssertNavigationEquals(nav, |
| 3956 windows_[0]->tabs[0]->navigations[1]); | 3957 windows_[0]->tabs[0]->navigations[1]); |
| 3957 } | 3958 } |
| 3958 */ | 3959 */ |
| 3959 | 3960 |
| 3960 } // namespace content | 3961 } // namespace content |
| OLD | NEW |