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

Side by Side Diff: ios/web_view/test/observer.h

Issue 2902403002: Add KVO compliant title property to CWVWebView. (Closed)
Patch Set: Remove observers directory. Created 3 years, 6 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_view/test/chrome_web_view_test.mm ('k') | ios/web_view/test/observer.mm » ('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 2017 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 #ifndef IOS_WEB_VIEW_TEST_OBSERVER_H_
6 #define IOS_WEB_VIEW_TEST_OBSERVER_H_
7
8 #import <Foundation/Foundation.h>
9
10 // Observes a KVO compliant property. To use this Observer, create an instance
11 // and call |setObservedObject:keyPath:|. Then test expected values against
12 // |lastValue|.
13 @interface Observer : NSObject
14
15 // The last value of performing |keyPath| on |object| after being notified of a
16 // KVO value change or null if a change has not been observed.
17 @property(nonatomic, nullable, readonly) id lastValue;
18
19 // The |keyPath| of |object| being observed.
20 @property(nonatomic, nullable, readonly) NSString* keyPath;
21
22 // The current |object| being observed.
23 @property(nonatomic, nullable, readonly, weak) NSObject* object;
24
25 // Sets the |object| and |keyPath| to observe. The |keyPath| property of
26 // |object| must exist and be KVO compliant.
27 - (void)setObservedObject:(nonnull NSObject*)object
28 keyPath:(nonnull NSString*)keyPath;
29
30 @end
31
32 #endif // IOS_WEB_VIEW_TEST_OBSERVER_H_
OLDNEW
« no previous file with comments | « ios/web_view/test/chrome_web_view_test.mm ('k') | ios/web_view/test/observer.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698