| 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/browser_process.h" | 5 #include "chrome/browser/browser_process.h" |
| 6 #include "chrome/browser/first_run/first_run.h" | 6 #include "chrome/browser/first_run/first_run.h" |
| 7 #include "chrome/browser/prefs/pref_service.h" | 7 #include "chrome/browser/prefs/pref_service.h" |
| 8 #include "chrome/common/pref_names.h" | 8 #include "chrome/common/pref_names.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 EXPECT_TRUE(first_run::SetShowWelcomePagePref()); | 27 EXPECT_TRUE(first_run::SetShowWelcomePagePref()); |
| 28 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( | 28 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( |
| 29 prefs::kShouldShowWelcomePage)); | 29 prefs::kShouldShowWelcomePage)); |
| 30 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( | 30 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( |
| 31 prefs::kShouldShowWelcomePage)); | 31 prefs::kShouldShowWelcomePage)); |
| 32 } | 32 } |
| 33 | 33 |
| 34 IN_PROC_BROWSER_TEST_F(FirstRunBrowserTest, SetOEMFirstRunBubblePref) { | 34 IN_PROC_BROWSER_TEST_F(FirstRunBrowserTest, SetOEMFirstRunBubblePref) { |
| 35 EXPECT_FALSE(g_browser_process->local_state()->FindPreference( | 35 EXPECT_FALSE(g_browser_process->local_state()->FindPreference( |
| 36 prefs::kShouldUseOEMFirstRunBubble)); | 36 prefs::kShouldUseOEMFirstRunBubble)); |
| 37 EXPECT_TRUE(FirstRun::SetOEMFirstRunBubblePref()); | 37 EXPECT_TRUE(first_run::SetOEMFirstRunBubblePref()); |
| 38 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( | 38 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( |
| 39 prefs::kShouldUseOEMFirstRunBubble)); | 39 prefs::kShouldUseOEMFirstRunBubble)); |
| 40 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( | 40 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( |
| 41 prefs::kShouldUseOEMFirstRunBubble)); | 41 prefs::kShouldUseOEMFirstRunBubble)); |
| 42 } | 42 } |
| 43 | 43 |
| 44 IN_PROC_BROWSER_TEST_F(FirstRunBrowserTest, SetMinimalFirstRunBubblePref) { | 44 IN_PROC_BROWSER_TEST_F(FirstRunBrowserTest, SetMinimalFirstRunBubblePref) { |
| 45 EXPECT_FALSE(g_browser_process->local_state()->FindPreference( | 45 EXPECT_FALSE(g_browser_process->local_state()->FindPreference( |
| 46 prefs::kShouldUseMinimalFirstRunBubble)); | 46 prefs::kShouldUseMinimalFirstRunBubble)); |
| 47 EXPECT_TRUE(first_run::SetMinimalFirstRunBubblePref()); | 47 EXPECT_TRUE(first_run::SetMinimalFirstRunBubblePref()); |
| 48 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( | 48 ASSERT_TRUE(g_browser_process->local_state()->FindPreference( |
| 49 prefs::kShouldUseMinimalFirstRunBubble)); | 49 prefs::kShouldUseMinimalFirstRunBubble)); |
| 50 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( | 50 EXPECT_TRUE(g_browser_process->local_state()->GetBoolean( |
| 51 prefs::kShouldUseMinimalFirstRunBubble)); | 51 prefs::kShouldUseMinimalFirstRunBubble)); |
| 52 } | 52 } |
| OLD | NEW |