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

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

Issue 2759613003: Use SameDocument instead of SamePage term on iOS. (Closed)
Patch Set: Actually fixed tests Created 3 years, 9 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/test/fakes/test_web_state_observer.mm ('k') | ios/web/web_state/navigation_context_impl.h » ('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 4a9856804f77ccaf78a686c588fa89eceb3e080f..4fdaa8c72458ca9d327e5692b2476967e01fd0f6 100644
--- a/ios/web/web_state/navigation_callbacks_inttest.mm
+++ b/ios/web/web_state/navigation_callbacks_inttest.mm
@@ -39,7 +39,7 @@ ACTION_P2(VerifyNewPageContext, web_state, url) {
// Verifies correctness of |NavigationContext| for same page navigation passed
// to |DidFinishNavigation|.
-ACTION_P2(VerifySamePageContext, web_state, url) {
+ACTION_P2(VerifySameDocumentContext, web_state, url) {
NavigationContext* context = arg0;
ASSERT_TRUE(context);
EXPECT_EQ(web_state, context->GetWebState());
@@ -103,12 +103,12 @@ TEST_F(DidFinishNavigationTest, UserInitiatedHashChangeNavigation) {
// Perform same-page navigation.
const GURL hash_url = HttpServer::MakeUrl("http://chromium.test#1");
EXPECT_CALL(*observer_, DidFinishNavigation(_))
- .WillOnce(VerifySamePageContext(web_state(), hash_url));
+ .WillOnce(VerifySameDocumentContext(web_state(), hash_url));
LoadUrl(hash_url);
// Perform same-page navigation by going back.
EXPECT_CALL(*observer_, DidFinishNavigation(_))
- .WillOnce(VerifySamePageContext(web_state(), url));
+ .WillOnce(VerifySameDocumentContext(web_state(), url));
ExecuteBlockAndWaitForLoad(url, ^{
navigation_manager()->GoBack();
});
@@ -129,7 +129,7 @@ TEST_F(DidFinishNavigationTest, RendererInitiatedHashChangeNavigation) {
// Perform same-page navigation using JavaScript.
const GURL hash_url = HttpServer::MakeUrl("http://chromium.test#1");
EXPECT_CALL(*observer_, DidFinishNavigation(_))
- .WillOnce(VerifySamePageContext(web_state(), hash_url));
+ .WillOnce(VerifySameDocumentContext(web_state(), hash_url));
ExecuteJavaScript(@"window.location.hash = '#1'");
}
@@ -148,13 +148,13 @@ TEST_F(DidFinishNavigationTest, StateNavigation) {
// Perform push state using JavaScript.
const GURL push_url = HttpServer::MakeUrl("http://chromium.test/test.html");
EXPECT_CALL(*observer_, DidFinishNavigation(_))
- .WillOnce(VerifySamePageContext(web_state(), push_url));
+ .WillOnce(VerifySameDocumentContext(web_state(), push_url));
ExecuteJavaScript(@"window.history.pushState('', 'Test', 'test.html')");
// Perform replace state using JavaScript.
const GURL replace_url = HttpServer::MakeUrl("http://chromium.test/1.html");
EXPECT_CALL(*observer_, DidFinishNavigation(_))
- .WillOnce(VerifySamePageContext(web_state(), replace_url));
+ .WillOnce(VerifySameDocumentContext(web_state(), replace_url));
ExecuteJavaScript(@"window.history.replaceState('', 'Test', '1.html')");
}
« no previous file with comments | « ios/web/public/test/fakes/test_web_state_observer.mm ('k') | ios/web/web_state/navigation_context_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698