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

Side by Side Diff: chrome/browser/ui/cocoa/window_size_autosaver_unittest.mm

Issue 1102733002: Remove most occurences of PrefRegistrySyncable::UNSYNCABLE_PREF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs-add-reg-funcs
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/cocoa/window_size_autosaver.h" 7 #import "chrome/browser/ui/cocoa/window_size_autosaver.h"
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 11 matching lines...) Expand all
22 CocoaProfileTest::SetUp(); 22 CocoaProfileTest::SetUp();
23 path_ = "WindowSizeAutosaverTest"; 23 path_ = "WindowSizeAutosaverTest";
24 window_ = 24 window_ =
25 [[NSWindow alloc] initWithContentRect:NSMakeRect(100, 101, 150, 151) 25 [[NSWindow alloc] initWithContentRect:NSMakeRect(100, 101, 150, 151)
26 styleMask:NSTitledWindowMask| 26 styleMask:NSTitledWindowMask|
27 NSResizableWindowMask 27 NSResizableWindowMask
28 backing:NSBackingStoreBuffered 28 backing:NSBackingStoreBuffered
29 defer:NO]; 29 defer:NO];
30 // TODO(joi): Do all registration up front. 30 // TODO(joi): Do all registration up front.
31 static_cast<user_prefs::PrefRegistrySyncable*>( 31 static_cast<user_prefs::PrefRegistrySyncable*>(
32 profile()->GetPrefs()->DeprecatedGetPrefRegistry())-> 32 profile()->GetPrefs()->DeprecatedGetPrefRegistry())
33 RegisterDictionaryPref( 33 ->RegisterDictionaryPref(path_);
34 path_,
35 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
36 } 34 }
37 35
38 void TearDown() override { 36 void TearDown() override {
39 [window_ close]; 37 [window_ close];
40 CocoaProfileTest::TearDown(); 38 CocoaProfileTest::TearDown();
41 } 39 }
42 40
43 public: 41 public:
44 NSWindow* window_; 42 NSWindow* window_;
45 const char* path_; 43 const char* path_;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int x1, y1, x2, y2; 201 int x1, y1, x2, y2;
204 EXPECT_FALSE(windowPref->GetInteger("x", &x1)); 202 EXPECT_FALSE(windowPref->GetInteger("x", &x1));
205 EXPECT_FALSE(windowPref->GetInteger("y", &x1)); 203 EXPECT_FALSE(windowPref->GetInteger("y", &x1));
206 ASSERT_FALSE(windowPref->GetInteger("left", &x1)); 204 ASSERT_FALSE(windowPref->GetInteger("left", &x1));
207 ASSERT_FALSE(windowPref->GetInteger("right", &x2)); 205 ASSERT_FALSE(windowPref->GetInteger("right", &x2));
208 ASSERT_FALSE(windowPref->GetInteger("top", &y1)); 206 ASSERT_FALSE(windowPref->GetInteger("top", &y1));
209 ASSERT_FALSE(windowPref->GetInteger("bottom", &y2)); 207 ASSERT_FALSE(windowPref->GetInteger("bottom", &y2));
210 } 208 }
211 209
212 } // namespace 210 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_view_prefs.cc ('k') | chrome/browser/ui/gesture_prefs_observer_factory_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698