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 d16401fd2e3f71bd71c3f472455ae8ce9bd4a6ae..1d6fd72c68966ed2e5e02e0c8ff0f87bd7aaee1e 100644 |
--- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm |
@@ -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) { |