OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 | 187 |
188 virtual void SetUp() OVERRIDE { | 188 virtual void SetUp() OVERRIDE { |
189 RenderViewHostImplTestHarness::SetUp(); | 189 RenderViewHostImplTestHarness::SetUp(); |
190 WebContents* web_contents = RenderViewHostImplTestHarness::web_contents(); | 190 WebContents* web_contents = RenderViewHostImplTestHarness::web_contents(); |
191 ASSERT_TRUE(web_contents); // The WebContents should be created by now. | 191 ASSERT_TRUE(web_contents); // The WebContents should be created by now. |
192 WebContentsObserver::Observe(web_contents); | 192 WebContentsObserver::Observe(web_contents); |
193 } | 193 } |
194 | 194 |
195 // WebContentsObserver: | 195 // WebContentsObserver: |
196 virtual void NavigateToPendingEntry( | 196 virtual void DidStartNavigationToPendingEntry( |
197 const GURL& url, | 197 const GURL& url, |
198 NavigationController::ReloadType reload_type) OVERRIDE { | 198 NavigationController::ReloadType reload_type) OVERRIDE { |
199 navigated_url_ = url; | 199 navigated_url_ = url; |
200 } | 200 } |
201 | 201 |
202 virtual void NavigationEntryCommitted( | 202 virtual void NavigationEntryCommitted( |
203 const LoadCommittedDetails& load_details) OVERRIDE { | 203 const LoadCommittedDetails& load_details) OVERRIDE { |
204 navigation_entry_committed_counter_++; | 204 navigation_entry_committed_counter_++; |
205 } | 205 } |
206 | 206 |
(...skipping 3628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3835 EXPECT_EQ(1, controller.GetEntryCount()); | 3835 EXPECT_EQ(1, controller.GetEntryCount()); |
3836 EXPECT_EQ(0, controller.GetCurrentEntryIndex()); | 3836 EXPECT_EQ(0, controller.GetCurrentEntryIndex()); |
3837 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); | 3837 EXPECT_EQ(0, controller.GetLastCommittedEntryIndex()); |
3838 EXPECT_EQ(-1, controller.GetPendingEntryIndex()); | 3838 EXPECT_EQ(-1, controller.GetPendingEntryIndex()); |
3839 EXPECT_FALSE(controller.CanGoBack()); | 3839 EXPECT_FALSE(controller.CanGoBack()); |
3840 EXPECT_FALSE(controller.CanGoForward()); | 3840 EXPECT_FALSE(controller.CanGoForward()); |
3841 EXPECT_EQ(url4, controller.GetVisibleEntry()->GetURL()); | 3841 EXPECT_EQ(url4, controller.GetVisibleEntry()->GetURL()); |
3842 } | 3842 } |
3843 | 3843 |
3844 } // namespace content | 3844 } // namespace content |
OLD | NEW |