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

Unified Diff: ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm

Issue 2819373004: [ios] Fix WebStateListFastEnumerationHelper observer unregistration. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm
diff --git a/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm b/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm
index c3209fa4c86b655c52e636960de7c75a56ad34bc..6465c101a0b827d685369b5644de0abf47f899e8 100644
--- a/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm
+++ b/ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper_unittest.mm
@@ -44,15 +44,12 @@ class WebStateListFastEnumerationHelperTest : public PlatformTest {
: web_state_list_(&web_state_list_delegate_) {}
NSArray* ArrayFromWebStateList() {
- id<WebStateProxyFactory> proxy =
+ WebStateListFastEnumerationHelper helper(
+ &web_state_list_,
[[WebStateProxyFactoryForWebStateListFastEnumerationHelperTest alloc]
- init];
- WebStateListFastEnumerationHelper* helper =
- [[WebStateListFastEnumerationHelper alloc]
- initWithWebStateList:&web_state_list_
- proxyFactory:proxy];
+ init]);
NSMutableArray* array = [NSMutableArray array];
- for (id wrapper in helper) {
+ for (id wrapper in helper.GetFastEnumeration()) {
// NSArray* cannot store a nil pointer. The NSFastEnumeration protocol
// allows returning nil as one of the value in the iterated container,
// so skip the value in that case (see NilWrapper test).
« no previous file with comments | « ios/chrome/browser/web_state_list/web_state_list_fast_enumeration_helper.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698