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

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

Issue 2896623003: Added web::NavigationContext::GetPageTransition. (Closed)
Patch Set: Rebased Created 3 years, 7 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/web_state/navigation_context_impl.mm ('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_context_impl_unittest.mm
diff --git a/ios/web/web_state/navigation_context_impl_unittest.mm b/ios/web/web_state/navigation_context_impl_unittest.mm
index 7566deb038f42a0880c3885c501fb572103cb518..9729d51ea8cdf746f34c07253ddae245f0bc1e84 100644
--- a/ios/web/web_state/navigation_context_impl_unittest.mm
+++ b/ios/web/web_state/navigation_context_impl_unittest.mm
@@ -33,10 +33,14 @@ class NavigationContextImplTest : public PlatformTest {
// Tests CreateNavigationContext factory method.
TEST_F(NavigationContextImplTest, NavigationContext) {
std::unique_ptr<NavigationContext> context =
- NavigationContextImpl::CreateNavigationContext(&web_state_, url_);
+ NavigationContextImpl::CreateNavigationContext(
+ &web_state_, url_, ui::PageTransition::PAGE_TRANSITION_FORWARD_BACK);
ASSERT_TRUE(context);
EXPECT_EQ(&web_state_, context->GetWebState());
+ EXPECT_TRUE(PageTransitionTypeIncludingQualifiersIs(
+ context->GetPageTransition(),
+ ui::PageTransition::PAGE_TRANSITION_FORWARD_BACK));
EXPECT_EQ(url_, context->GetUrl());
EXPECT_FALSE(context->IsSameDocument());
EXPECT_FALSE(context->GetError());
@@ -46,7 +50,8 @@ TEST_F(NavigationContextImplTest, NavigationContext) {
// Tests NavigationContextImpl Setters.
TEST_F(NavigationContextImplTest, Setters) {
std::unique_ptr<NavigationContextImpl> context =
- NavigationContextImpl::CreateNavigationContext(&web_state_, url_);
+ NavigationContextImpl::CreateNavigationContext(
+ &web_state_, url_, ui::PageTransition::PAGE_TRANSITION_FORWARD_BACK);
ASSERT_TRUE(context);
ASSERT_FALSE(context->IsSameDocument());
« no previous file with comments | « ios/web/web_state/navigation_context_impl.mm ('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