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

Side by Side Diff: chrome/browser/cocoa/preferences_window_controller_unittest.mm

Issue 3323022: Create a DefaultPrefStore to hold registered application-default preference v... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "base/scoped_nsobject.h" 7 #import "base/scoped_nsobject.h"
8 #import "chrome/browser/cocoa/preferences_window_controller.h" 8 #import "chrome/browser/cocoa/preferences_window_controller.h"
9 #include "chrome/browser/cocoa/browser_test_helper.h" 9 #include "chrome/browser/cocoa/browser_test_helper.h"
10 #include "chrome/browser/cocoa/cocoa_test_helper.h" 10 #include "chrome/browser/cocoa/cocoa_test_helper.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 name:NSWindowWillCloseNotification 71 name:NSWindowWillCloseNotification
72 object:[pref_controller_ window]]; 72 object:[pref_controller_ window]];
73 [[pref_controller_ window] performClose:observer]; 73 [[pref_controller_ window] performClose:observer];
74 EXPECT_TRUE(observer.get()->gotNotification_); 74 EXPECT_TRUE(observer.get()->gotNotification_);
75 [defaultCenter removeObserver:observer.get()]; 75 [defaultCenter removeObserver:observer.get()];
76 76
77 // Prevent pref_controller_ from being closed again in TearDown() 77 // Prevent pref_controller_ from being closed again in TearDown()
78 pref_controller_ = nil; 78 pref_controller_ = nil;
79 } 79 }
80 80
81 // Crashes, http://crbug.com/54950 81 TEST_F(PrefsControllerTest, ValidateCustomHomePagesTable) {
82 TEST_F(PrefsControllerTest, DISABLED_ValidateCustomHomePagesTable) {
83 // First, insert two valid URLs into the CustomHomePagesModel. 82 // First, insert two valid URLs into the CustomHomePagesModel.
84 GURL url1("http://www.google.com/"); 83 GURL url1("http://www.google.com/");
85 GURL url2("http://maps.google.com/"); 84 GURL url2("http://maps.google.com/");
86 std::vector<GURL> urls; 85 std::vector<GURL> urls;
87 urls.push_back(url1); 86 urls.push_back(url1);
88 urls.push_back(url2); 87 urls.push_back(url2);
89 [[pref_controller_ customPagesSource] setURLs:urls]; 88 [[pref_controller_ customPagesSource] setURLs:urls];
90 EXPECT_EQ(2U, [[pref_controller_ customPagesSource] countOfCustomHomePages]); 89 EXPECT_EQ(2U, [[pref_controller_ customPagesSource] countOfCustomHomePages]);
91 90
92 // Now insert a bad (empty) URL into the model. 91 // Now insert a bad (empty) URL into the model.
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 231
233 // TODO(akalin): Figure out how to test animation; we'll need everything 232 // TODO(akalin): Figure out how to test animation; we'll need everything
234 // to stick around until the animation finishes. 233 // to stick around until the animation finishes.
235 } 234 }
236 235
237 // TODO(akalin): Figure out how to test sync controls. 236 // TODO(akalin): Figure out how to test sync controls.
238 // TODO(akalin): Figure out how to test that sync controls are not shown 237 // TODO(akalin): Figure out how to test that sync controls are not shown
239 // when there isn't a sync service. 238 // when there isn't a sync service.
240 239
241 } // namespace 240 } // namespace
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_pref_store.cc » ('j') | chrome/browser/prefs/pref_value_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698