OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/prefs/session_startup_pref.h" | 5 #include "chrome/browser/prefs/session_startup_pref.h" |
6 #include "chrome/common/pref_names.h" | 6 #include "chrome/common/pref_names.h" |
7 #include "chrome/test/base/testing_pref_service_syncable.h" | 7 #include "chrome/test/base/testing_pref_service_syncable.h" |
8 #include "components/user_prefs/pref_registry_syncable.h" | 8 #include "components/pref_registry/pref_registry_syncable.h" |
9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 | 11 |
12 #if defined(OS_MACOSX) | 12 #if defined(OS_MACOSX) |
13 #include "chrome/browser/ui/cocoa/window_restore_utils.h" | 13 #include "chrome/browser/ui/cocoa/window_restore_utils.h" |
14 #endif | 14 #endif |
15 | 15 |
16 // Unit tests for SessionStartupPref. | 16 // Unit tests for SessionStartupPref. |
17 class SessionStartupPrefTest : public testing::Test { | 17 class SessionStartupPrefTest : public testing::Test { |
18 public: | 18 public: |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 // Trigger the migration. | 195 // Trigger the migration. |
196 SessionStartupPref pref = SessionStartupPref::GetStartupPref( | 196 SessionStartupPref pref = SessionStartupPref::GetStartupPref( |
197 pref_service_.get()); | 197 pref_service_.get()); |
198 | 198 |
199 // The pref is now explicit. | 199 // The pref is now explicit. |
200 EXPECT_EQ(SessionStartupPref::LAST, pref.type); | 200 EXPECT_EQ(SessionStartupPref::LAST, pref.type); |
201 EXPECT_FALSE(SessionStartupPref::TypeIsDefault(pref_service_.get())); | 201 EXPECT_FALSE(SessionStartupPref::TypeIsDefault(pref_service_.get())); |
202 } | 202 } |
203 #endif | 203 #endif |
OLD | NEW |