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

Side by Side Diff: ios/web/web_state/ui/crw_web_controller_unittest.mm

Issue 2306053002: Revert of [ios] Implemented LoadHtml w/o using data:// URLs. (Closed)
Patch Set: Created 4 years, 3 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/ui/crw_web_controller.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/ui/crw_web_controller.h" 5 #import "ios/web/web_state/ui/crw_web_controller.h"
6 6
7 #import <WebKit/WebKit.h> 7 #import <WebKit/WebKit.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 190
191 - (void)webController:(CRWWebController*)webController 191 - (void)webController:(CRWWebController*)webController
192 didBlockPopup:(const web::BlockedPopupInfo&)blockedPopupInfo { 192 didBlockPopup:(const web::BlockedPopupInfo&)blockedPopupInfo {
193 _blockedPopupInfo.reset(new web::BlockedPopupInfo(blockedPopupInfo)); 193 _blockedPopupInfo.reset(new web::BlockedPopupInfo(blockedPopupInfo));
194 } 194 }
195 195
196 - (web::BlockedPopupInfo*)blockedPopupInfo { 196 - (web::BlockedPopupInfo*)blockedPopupInfo {
197 return _blockedPopupInfo.get(); 197 return _blockedPopupInfo.get();
198 } 198 }
199 - (BOOL)webController:(CRWWebController*)webController 199
200 shouldOpenURL:(const GURL&)URL
201 mainDocumentURL:(const GURL&)mainDocumentURL
202 linkClicked:(BOOL)linkClicked {
203 return YES;
204 }
205 @end 200 @end
206 201
207 @interface CountingObserver : NSObject<CRWWebControllerObserver> 202 @interface CountingObserver : NSObject<CRWWebControllerObserver>
208 203
209 @property(nonatomic, readonly) int pageLoadedCount; 204 @property(nonatomic, readonly) int pageLoadedCount;
210 @property(nonatomic, readonly) int messageCount; 205 @property(nonatomic, readonly) int messageCount;
211 @end 206 @end
212 207
213 @implementation CountingObserver 208 @implementation CountingObserver
214 @synthesize pageLoadedCount = _pageLoadedCount; 209 @synthesize pageLoadedCount = _pageLoadedCount;
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 1005
1011 [web_controller() setDelegate:delegate]; 1006 [web_controller() setDelegate:delegate];
1012 web::SimulateWKWebViewCrash(webView_); 1007 web::SimulateWKWebViewCrash(webView_);
1013 1008
1014 EXPECT_OCMOCK_VERIFY(delegate); 1009 EXPECT_OCMOCK_VERIFY(delegate);
1015 EXPECT_FALSE([web_controller() isViewAlive]); 1010 EXPECT_FALSE([web_controller() isViewAlive]);
1016 [web_controller() setDelegate:nil]; 1011 [web_controller() setDelegate:nil];
1017 }; 1012 };
1018 1013
1019 } // namespace 1014 } // namespace
OLDNEW
« no previous file with comments | « ios/web/web_state/ui/crw_web_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698