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

Side by Side Diff: chrome/browser/ui/cocoa/options/custom_home_pages_model_unittest.mm

Issue 6339002: [Mac] Consolidate all files relating to preferences in a subdir of c/b/ui/coc... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "base/scoped_nsobject.h" 5 #include "base/scoped_nsobject.h"
6 #include "chrome/browser/prefs/session_startup_pref.h" 6 #include "chrome/browser/prefs/session_startup_pref.h"
7 #include "chrome/browser/ui/cocoa/browser_test_helper.h" 7 #include "chrome/browser/ui/cocoa/browser_test_helper.h"
8 #import "chrome/browser/ui/cocoa/custom_home_pages_model.h" 8 #import "chrome/browser/ui/cocoa/options/custom_home_pages_model.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #import "testing/gtest_mac.h" 10 #import "testing/gtest_mac.h"
11 #include "testing/platform_test.h" 11 #include "testing/platform_test.h"
12 12
13 // A helper for KVO and NSNotifications. Makes a note that it's been called 13 // A helper for KVO and NSNotifications. Makes a note that it's been called
14 // back. 14 // back.
15 @interface CustomHomePageHelper : NSObject { 15 @interface CustomHomePageHelper : NSObject {
16 @public 16 @public
17 BOOL sawNotification_; 17 BOOL sawNotification_;
18 } 18 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 187
188 EXPECT_TRUE(kvo_helper.get()->sawNotification_); 188 EXPECT_TRUE(kvo_helper.get()->sawNotification_);
189 EXPECT_EQ([model_ countOfCustomHomePages], 1U); 189 EXPECT_EQ([model_ countOfCustomHomePages], 1U);
190 EXPECT_NSEQ(@"http://www.google.com/", 190 EXPECT_NSEQ(@"http://www.google.com/",
191 EntryURL([model_ objectInCustomHomePagesAtIndex:0])); 191 EntryURL([model_ objectInCustomHomePagesAtIndex:0]));
192 192
193 [model_ removeObserver:kvo_helper.get() forKeyPath:@"customHomePages"]; 193 [model_ removeObserver:kvo_helper.get() forKeyPath:@"customHomePages"];
194 } 194 }
195 195
196 } // namespace 196 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698