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

Side by Side Diff: ios/web/public/test/test_web_view_content_view.mm

Issue 2614443004: [ios] Moved all web mocks to ios/web/public/test/fakes. (Closed)
Patch Set: Moved test_redirect_observer back Created 3 years, 11 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/public/test/test_web_view_content_view.h ('k') | ios/web/public/test/web_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "ios/web/public/test/test_web_view_content_view.h"
6
7 #include "base/logging.h"
8 #import "base/mac/scoped_nsobject.h"
9
10 @interface TestWebViewContentView () {
11 base::scoped_nsprotocol<id> _mockWebView;
12 base::scoped_nsprotocol<id> _mockScrollView;
13 }
14
15 @end
16
17 @implementation TestWebViewContentView
18
19 - (instancetype)initWithMockWebView:(id)webView scrollView:(id)scrollView {
20 self = [super initForTesting];
21 if (self) {
22 DCHECK(webView);
23 DCHECK(scrollView);
24 _mockWebView.reset([webView retain]);
25 _mockScrollView.reset([scrollView retain]);
26 }
27 return self;
28 }
29
30 - (instancetype)initWithCoder:(NSCoder*)decoder {
31 NOTREACHED();
32 return nil;
33 }
34
35 - (instancetype)initWithFrame:(CGRect)frame {
36 NOTREACHED();
37 return nil;
38 }
39
40 #pragma mark Accessors
41
42 - (UIScrollView*)scrollView {
43 return static_cast<UIScrollView*>(_mockScrollView.get());
44 }
45
46 - (UIView*)webView {
47 return static_cast<UIView*>(_mockWebView.get());
48 }
49
50 @end
OLDNEW
« no previous file with comments | « ios/web/public/test/test_web_view_content_view.h ('k') | ios/web/public/test/web_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698