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

Side by Side Diff: ios/web/web_state/web_state_impl_unittest.mm

Issue 2752013002: Removed webControllerDidUpdateSSLStatusForCurrentNavigationItem:. (Closed)
Patch Set: 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') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 observer->change_loading_progress_info()->web_state); 269 observer->change_loading_progress_info()->web_state);
270 EXPECT_EQ(kTestLoadProgress, 270 EXPECT_EQ(kTestLoadProgress,
271 observer->change_loading_progress_info()->progress); 271 observer->change_loading_progress_info()->progress);
272 272
273 // Test that TitleWasSet() is called. 273 // Test that TitleWasSet() is called.
274 ASSERT_FALSE(observer->title_was_set_info()); 274 ASSERT_FALSE(observer->title_was_set_info());
275 web_state_->OnTitleChanged(); 275 web_state_->OnTitleChanged();
276 ASSERT_TRUE(observer->title_was_set_info()); 276 ASSERT_TRUE(observer->title_was_set_info());
277 EXPECT_EQ(web_state_.get(), observer->title_was_set_info()->web_state); 277 EXPECT_EQ(web_state_.get(), observer->title_was_set_info()->web_state);
278 278
279 // Test that DidChangeVisibleSecurityState() is called.
280 ASSERT_FALSE(observer->did_change_visible_security_state_info());
281 web_state_->OnVisibleSecurityStateChange();
282 ASSERT_TRUE(observer->did_change_visible_security_state_info());
283 EXPECT_EQ(web_state_.get(),
284 observer->did_change_visible_security_state_info()->web_state);
285
279 // Test that DocumentSubmitted() is called. 286 // Test that DocumentSubmitted() is called.
280 ASSERT_FALSE(observer->submit_document_info()); 287 ASSERT_FALSE(observer->submit_document_info());
281 std::string kTestFormName("form-name"); 288 std::string kTestFormName("form-name");
282 BOOL user_initiated = true; 289 BOOL user_initiated = true;
283 web_state_->OnDocumentSubmitted(kTestFormName, user_initiated); 290 web_state_->OnDocumentSubmitted(kTestFormName, user_initiated);
284 ASSERT_TRUE(observer->submit_document_info()); 291 ASSERT_TRUE(observer->submit_document_info());
285 EXPECT_EQ(web_state_.get(), observer->submit_document_info()->web_state); 292 EXPECT_EQ(web_state_.get(), observer->submit_document_info()->web_state);
286 EXPECT_EQ(kTestFormName, observer->submit_document_info()->form_name); 293 EXPECT_EQ(kTestFormName, observer->submit_document_info()->form_name);
287 EXPECT_EQ(user_initiated, observer->submit_document_info()->user_initiated); 294 EXPECT_EQ(user_initiated, observer->submit_document_info()->user_initiated);
288 295
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 // Check that a false return value is forwarded correctly. 668 // Check that a false return value is forwarded correctly.
662 EXPECT_FALSE( 669 EXPECT_FALSE(
663 web_state_->OnScriptCommandReceived(kCommand2, value_2, kUrl2, false)); 670 web_state_->OnScriptCommandReceived(kCommand2, value_2, kUrl2, false));
664 EXPECT_FALSE(is_called_1); 671 EXPECT_FALSE(is_called_1);
665 EXPECT_TRUE(is_called_2); 672 EXPECT_TRUE(is_called_2);
666 673
667 web_state_->RemoveScriptCommandCallback(kPrefix2); 674 web_state_->RemoveScriptCommandCallback(kPrefix2);
668 } 675 }
669 676
670 } // namespace web 677 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/web_state_impl.mm ('k') | ios/web/web_state/web_state_observer_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698