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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespaces in mac files 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
index e0a9eddd3ef6aee6783e1132777e5af9405a8388..497967ba90de936039cc48b15d28b800b777b979 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -85,14 +85,20 @@ TEST_F(BrowserWindowControllerTest, TestSaveWindowPosition) {
ASSERT_TRUE(prefs != NULL);
// Check to make sure there is no existing pref for window placement.
- ASSERT_TRUE(prefs->GetDictionary(prefs::kBrowserWindowPlacement) == NULL);
+ const DictionaryValue* browser_window_placement =
+ prefs->GetDictionary(prefs::kBrowserWindowPlacement);
+ ASSERT_TRUE(browser_window_placement);
+ EXPECT_TRUE(browser_window_placement->empty());
// Ask the window to save its position, then check that a preference
// exists. We're technically passing in a pointer to the user prefs
// and not the local state prefs, but a PrefService* is a
// PrefService*, and this is a unittest.
[controller_ saveWindowPositionToPrefs:prefs];
- EXPECT_TRUE(prefs->GetDictionary(prefs::kBrowserWindowPlacement) != NULL);
+ browser_window_placement =
+ prefs->GetDictionary(prefs::kBrowserWindowPlacement);
+ ASSERT_TRUE(browser_window_placement);
+ EXPECT_FALSE(browser_window_placement->empty());
}
TEST_F(BrowserWindowControllerTest, TestFullScreenWindow) {

Powered by Google App Engine
This is Rietveld 408576698