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

Side by Side Diff: ios/web/web_state/web_state_impl_unittest.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 unified diff | Download patch
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/web/web_state/web_state_impl.h" 5 #import "ios/web/web_state/web_state_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 ASSERT_TRUE(observer->load_page_info()); 385 ASSERT_TRUE(observer->load_page_info());
386 EXPECT_EQ(web_state_.get(), observer->load_page_info()->web_state); 386 EXPECT_EQ(web_state_.get(), observer->load_page_info()->web_state);
387 EXPECT_FALSE(observer->load_page_info()->success); 387 EXPECT_FALSE(observer->load_page_info()->success);
388 web_state_->OnPageLoaded(url, true); 388 web_state_->OnPageLoaded(url, true);
389 ASSERT_TRUE(observer->load_page_info()); 389 ASSERT_TRUE(observer->load_page_info());
390 EXPECT_EQ(web_state_.get(), observer->load_page_info()->web_state); 390 EXPECT_EQ(web_state_.get(), observer->load_page_info()->web_state);
391 EXPECT_TRUE(observer->load_page_info()->success); 391 EXPECT_TRUE(observer->load_page_info()->success);
392 392
393 // Test that DidFinishNavigation() is called for same page navigations. 393 // Test that DidFinishNavigation() is called for same page navigations.
394 ASSERT_FALSE(observer->did_finish_navigation_info()); 394 ASSERT_FALSE(observer->did_finish_navigation_info());
395 web_state_->OnSamePageNavigation(url); 395 web_state_->OnSameDocumentNavigation(url);
396 ASSERT_TRUE(observer->did_finish_navigation_info()); 396 ASSERT_TRUE(observer->did_finish_navigation_info());
397 EXPECT_EQ(web_state_.get(), 397 EXPECT_EQ(web_state_.get(),
398 observer->did_finish_navigation_info()->web_state); 398 observer->did_finish_navigation_info()->web_state);
399 NavigationContext* context = 399 NavigationContext* context =
400 observer->did_finish_navigation_info()->context.get(); 400 observer->did_finish_navigation_info()->context.get();
401 ASSERT_TRUE(context); 401 ASSERT_TRUE(context);
402 EXPECT_EQ(url, context->GetUrl()); 402 EXPECT_EQ(url, context->GetUrl());
403 EXPECT_TRUE(context->IsSameDocument()); 403 EXPECT_TRUE(context->IsSameDocument());
404 EXPECT_FALSE(context->IsErrorPage()); 404 EXPECT_FALSE(context->IsErrorPage());
405 405
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 // Check that a false return value is forwarded correctly. 675 // Check that a false return value is forwarded correctly.
676 EXPECT_FALSE( 676 EXPECT_FALSE(
677 web_state_->OnScriptCommandReceived(kCommand2, value_2, kUrl2, false)); 677 web_state_->OnScriptCommandReceived(kCommand2, value_2, kUrl2, false));
678 EXPECT_FALSE(is_called_1); 678 EXPECT_FALSE(is_called_1);
679 EXPECT_TRUE(is_called_2); 679 EXPECT_TRUE(is_called_2);
680 680
681 web_state_->RemoveScriptCommandCallback(kPrefix2); 681 web_state_->RemoveScriptCommandCallback(kPrefix2);
682 } 682 }
683 683
684 } // namespace web 684 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698