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

Side by Side Diff: ios/chrome/browser/web/repost_form_tab_helper_unittest.mm

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/chrome/browser/web/repost_form_tab_helper.h" 5 #import "ios/chrome/browser/web/repost_form_tab_helper.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 web_state_->SetView(view); 44 web_state_->SetView(view);
45 web_state_->SetWebUsageEnabled(true); 45 web_state_->SetWebUsageEnabled(true);
46 46
47 RepostFormTabHelper::CreateForWebState(web_state_.get()); 47 RepostFormTabHelper::CreateForWebState(web_state_.get());
48 } 48 }
49 49
50 // Presents a repost form dialog using RepostFormTabHelperTest. 50 // Presents a repost form dialog using RepostFormTabHelperTest.
51 void PresentDialog() { 51 void PresentDialog() {
52 ASSERT_FALSE(GetAlertController()); 52 ASSERT_FALSE(GetAlertController());
53 auto helper = RepostFormTabHelper::FromWebState(web_state_.get()); 53 auto* helper = RepostFormTabHelper::FromWebState(web_state_.get());
54 helper->PresentDialog(location_, base::Bind(&IgnoreBool)); 54 helper->PresentDialog(location_, base::Bind(&IgnoreBool));
55 ASSERT_TRUE(GetAlertController()); 55 ASSERT_TRUE(GetAlertController());
56 } 56 }
57 57
58 // Return presented view controller as UIAlertController. 58 // Return presented view controller as UIAlertController.
59 UIAlertController* GetAlertController() const { 59 UIAlertController* GetAlertController() const {
60 return base::mac::ObjCCastStrict<UIAlertController>( 60 return base::mac::ObjCCastStrict<UIAlertController>(
61 view_controller_.presentedViewController); 61 view_controller_.presentedViewController);
62 } 62 }
63 63
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 98
99 // Tests that dialog is dismissed after provisional navigation has started. 99 // Tests that dialog is dismissed after provisional navigation has started.
100 TEST_F(RepostFormTabHelperTest, DismissingOnNavigationStart) { 100 TEST_F(RepostFormTabHelperTest, DismissingOnNavigationStart) {
101 PresentDialog(); 101 PresentDialog();
102 web_state_->OnProvisionalNavigationStarted(GURL()); 102 web_state_->OnProvisionalNavigationStarted(GURL());
103 base::test::ios::WaitUntilCondition(^{ 103 base::test::ios::WaitUntilCondition(^{
104 return GetAlertController() != nil; 104 return GetAlertController() != nil;
105 }); 105 });
106 } 106 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/blocked_popup_tab_helper_unittest.mm ('k') | ios/web/web_state/http_auth_inttest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698