Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: ios/web/navigation/crw_session_controller_unittest.mm

Issue 2491773005: [ios] Removed canGoBack/canGoForward API from CRWSessionController. (Closed)
Patch Set: Fixed compilation. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/navigation/crw_session_controller.mm ('k') | ios/web/navigation/navigation_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/crw_session_controller_unittest.mm
diff --git a/ios/web/navigation/crw_session_controller_unittest.mm b/ios/web/navigation/crw_session_controller_unittest.mm
index ef709f6c1dd32ac8bbec42545f39d91ea5367242..b6b6a65fd3ac382c2045e5397647d30247f65568 100644
--- a/ios/web/navigation/crw_session_controller_unittest.mm
+++ b/ios/web/navigation/crw_session_controller_unittest.mm
@@ -688,61 +688,6 @@ TEST_F(CRWSessionControllerTest, GoDelta) {
ASSERT_EQ(1, [session_controller_ previousNavigationIndex]);
}
-TEST_F(CRWSessionControllerTest, CanGoBackWithoutCommitedEntry) {
- EXPECT_FALSE([session_controller_ canGoBack]);
- EXPECT_FALSE([session_controller_ canGoDelta:-1]);
-}
-
-// Tests that |canGoBack| returns NO if there is a transient entry, but no
-// committed entries.
-TEST_F(CRWSessionControllerTest, CanGoBackWithTransientEntry) {
- [session_controller_ addTransientEntryWithURL:GURL("http://www.url.com")];
-
- EXPECT_FALSE([session_controller_ canGoBack]);
-}
-
-// Tests that |canGoBack| returns YES if there is a transient entry and at least
-// one committed entry.
-TEST_F(CRWSessionControllerTest, CanGoBackWithTransientEntryAndCommittedEntry) {
- [session_controller_ addPendingEntry:GURL("http://www.url.com")
- referrer:MakeReferrer("http://www.referer.com")
- transition:ui::PAGE_TRANSITION_TYPED
- rendererInitiated:NO];
- [session_controller_ commitPendingEntry];
- [session_controller_ addTransientEntryWithURL:GURL("http://www.url.com")];
-
- EXPECT_TRUE([session_controller_ canGoBack]);
-}
-
-TEST_F(CRWSessionControllerTest, CanGoBackWithSingleCommitedEntry) {
- [session_controller_
- addPendingEntry:GURL("http://www.url.com")
- referrer:MakeReferrer("http://www.referer.com")
- transition:ui::PAGE_TRANSITION_TYPED
- rendererInitiated:NO];
- [session_controller_ commitPendingEntry];
-
- EXPECT_FALSE([session_controller_ canGoBack]);
- EXPECT_FALSE([session_controller_ canGoDelta:-1]);
-}
-
-TEST_F(CRWSessionControllerTest, CanGoForwardWithoutCommitedEntry) {
- EXPECT_FALSE([session_controller_ canGoForward]);
- EXPECT_FALSE([session_controller_ canGoDelta:1]);
-}
-
-TEST_F(CRWSessionControllerTest, CanGoForwardWithSingleCommitedEntry) {
- [session_controller_
- addPendingEntry:GURL("http://www.url.com")
- referrer:MakeReferrer("http://www.referer.com")
- transition:ui::PAGE_TRANSITION_TYPED
- rendererInitiated:NO];
- [session_controller_ commitPendingEntry];
-
- EXPECT_FALSE([session_controller_ canGoForward]);
- EXPECT_FALSE([session_controller_ canGoDelta:1]);
-}
-
// Helper to create a NavigationItem. Caller is responsible for freeing
// the memory.
web::NavigationItem* CreateNavigationItem(const std::string& url,
« no previous file with comments | « ios/web/navigation/crw_session_controller.mm ('k') | ios/web/navigation/navigation_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698