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

Unified Diff: ios/web/web_state/navigation_callbacks_inttest.mm

Issue 2724383003: Removed -[CRWWebDelegate webDidStartLoadingURL:updateHistory:]. (Closed)
Patch Set: Fixed ios_web_unittests Created 3 years, 10 months 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/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/navigation_callbacks_inttest.mm
diff --git a/ios/web/web_state/navigation_callbacks_inttest.mm b/ios/web/web_state/navigation_callbacks_inttest.mm
index 2517471d376c3bdbebd7ce236fe2125fbc1ae3ef..4fa3001563237b6ce56cd4aca0f39c30c0fb3a99 100644
--- a/ios/web/web_state/navigation_callbacks_inttest.mm
+++ b/ios/web/web_state/navigation_callbacks_inttest.mm
@@ -5,6 +5,8 @@
#include <memory>
#include "base/memory/ptr_util.h"
+#import "ios/web/public/navigation_item.h"
+#import "ios/web/public/navigation_manager.h"
#import "ios/web/public/test/http_server.h"
#include "ios/web/public/test/http_server_util.h"
#include "ios/web/public/web_state/navigation_context.h"
@@ -29,6 +31,10 @@ ACTION_P2(VerifyNewPageContext, web_state, url) {
EXPECT_EQ(url, context->GetUrl());
EXPECT_FALSE(context->IsSamePage());
EXPECT_FALSE(context->IsErrorPage());
+ NavigationManager* navigation_manager = web_state->GetNavigationManager();
+ NavigationItem* item = navigation_manager->GetLastCommittedItem();
+ EXPECT_GT(item->GetTimestamp().ToInternalValue(), 0);
+ EXPECT_EQ(url, item->GetURL());
}
// Verifies correctness of |NavigationContext| for same page navigation passed
@@ -40,6 +46,10 @@ ACTION_P2(VerifySamePageContext, web_state, url) {
EXPECT_EQ(url, context->GetUrl());
EXPECT_TRUE(context->IsSamePage());
EXPECT_FALSE(context->IsErrorPage());
+ NavigationManager* navigation_manager = web_state->GetNavigationManager();
+ NavigationItem* item = navigation_manager->GetLastCommittedItem();
+ EXPECT_GT(item->GetTimestamp().ToInternalValue(), 0);
+ EXPECT_EQ(url, item->GetURL());
}
// Mocks DidFinishNavigation navigation callback.
« no previous file with comments | « ios/web/public/web_state/ui/crw_web_delegate.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698