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

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

Issue 2295053003: [ios] Implemented LoadHtml w/o using data:// URLs. (Closed)
Patch Set: Small cleanup 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
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 199 - (BOOL)webController:(CRWWebController*)webController
200 shouldOpenURL:(const GURL&)URL
201 mainDocumentURL:(const GURL&)mainDocumentURL
202 linkClicked:(BOOL)linkClicked {
203 return YES;
204 }
200 @end 205 @end
201 206
202 @interface CountingObserver : NSObject<CRWWebControllerObserver> 207 @interface CountingObserver : NSObject<CRWWebControllerObserver>
203 208
204 @property(nonatomic, readonly) int pageLoadedCount; 209 @property(nonatomic, readonly) int pageLoadedCount;
205 @property(nonatomic, readonly) int messageCount; 210 @property(nonatomic, readonly) int messageCount;
206 @end 211 @end
207 212
208 @implementation CountingObserver 213 @implementation CountingObserver
209 @synthesize pageLoadedCount = _pageLoadedCount; 214 @synthesize pageLoadedCount = _pageLoadedCount;
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 1010
1006 [web_controller() setDelegate:delegate]; 1011 [web_controller() setDelegate:delegate];
1007 web::SimulateWKWebViewCrash(webView_); 1012 web::SimulateWKWebViewCrash(webView_);
1008 1013
1009 EXPECT_OCMOCK_VERIFY(delegate); 1014 EXPECT_OCMOCK_VERIFY(delegate);
1010 EXPECT_FALSE([web_controller() isViewAlive]); 1015 EXPECT_FALSE([web_controller() isViewAlive]);
1011 [web_controller() setDelegate:nil]; 1016 [web_controller() setDelegate:nil];
1012 }; 1017 };
1013 1018
1014 } // namespace 1019 } // namespace
OLDNEW
« ios/web/public/test/web_test_with_web_state.mm ('K') | « 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