| 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/pref_registry_syncable.h" | 5 #include "chrome/browser/prefs/pref_registry_syncable.h" |
| 6 #include "chrome/browser/prefs/session_startup_pref.h" | 6 #include "chrome/browser/prefs/session_startup_pref.h" |
| 7 #include "chrome/common/pref_names.h" | 7 #include "chrome/common/pref_names.h" |
| 8 #include "chrome/test/base/testing_pref_service.h" | 8 #include "chrome/test/base/testing_pref_service_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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 | 184 |
| 185 // Trigger the migration. | 185 // Trigger the migration. |
| 186 SessionStartupPref pref = SessionStartupPref::GetStartupPref( | 186 SessionStartupPref pref = SessionStartupPref::GetStartupPref( |
| 187 pref_service_.get()); | 187 pref_service_.get()); |
| 188 | 188 |
| 189 // The pref is now explicit. | 189 // The pref is now explicit. |
| 190 EXPECT_EQ(SessionStartupPref::LAST, pref.type); | 190 EXPECT_EQ(SessionStartupPref::LAST, pref.type); |
| 191 EXPECT_FALSE(SessionStartupPref::TypeIsDefault(pref_service_.get())); | 191 EXPECT_FALSE(SessionStartupPref::TypeIsDefault(pref_service_.get())); |
| 192 } | 192 } |
| 193 #endif | 193 #endif |
| OLD | NEW |