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

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

Issue 2724953004: Test actual arguments in WebStateImplTest::ObserverTest. (Closed)
Patch Set: Rebased 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
Index: ios/web/web_state/web_state_observer_bridge_unittest.mm
diff --git a/ios/web/web_state/web_state_observer_bridge_unittest.mm b/ios/web/web_state/web_state_observer_bridge_unittest.mm
index 5aa61c1cdb6633694ebd8e871ff93cf7445dbc62..f9b5f06acae100ba6fa02dedd789894d9fa0461b 100644
--- a/ios/web/web_state/web_state_observer_bridge_unittest.mm
+++ b/ios/web/web_state/web_state_observer_bridge_unittest.mm
@@ -53,7 +53,13 @@ TEST_F(WebStateObserverBridgeTest, DidFinishNavigation) {
ASSERT_TRUE([observer_ didFinishNavigationInfo]);
EXPECT_EQ(&test_web_state_, [observer_ didFinishNavigationInfo]->web_state);
- EXPECT_EQ(context.get(), [observer_ didFinishNavigationInfo]->context);
+ web::NavigationContext* actual_context =
+ [observer_ didFinishNavigationInfo]->context.get();
+ ASSERT_TRUE(actual_context);
+ EXPECT_EQ(&test_web_state_, actual_context->GetWebState());
+ EXPECT_EQ(context->IsSamePage(), actual_context->IsSamePage());
+ EXPECT_EQ(context->IsErrorPage(), actual_context->IsErrorPage());
+ EXPECT_EQ(context->GetUrl(), actual_context->GetUrl());
}
// Tests |webState:didCommitNavigationWithDetails:| forwarding.

Powered by Google App Engine
This is Rietveld 408576698