OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/prefs/pref_value_map.h" | 9 #include "base/prefs/pref_value_map.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/policy/configuration_policy_handler.h" | |
14 #include "chrome/browser/prefs/session_startup_pref.h" | 13 #include "chrome/browser/prefs/session_startup_pref.h" |
15 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" | 14 #include "chrome/browser/sessions/restore_on_startup_policy_handler.h" |
16 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
| 16 #include "components/policy/core/browser/configuration_policy_handler.h" |
17 #include "components/policy/core/browser/policy_error_map.h" | 17 #include "components/policy/core/browser/policy_error_map.h" |
18 #include "components/policy/core/common/policy_map.h" | 18 #include "components/policy/core/common/policy_map.h" |
19 #include "grit/component_strings.h" | 19 #include "grit/component_strings.h" |
20 #include "policy/policy_constants.h" | 20 #include "policy/policy_constants.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "ui/base/l10n/l10n_util.h" | 22 #include "ui/base/l10n/l10n_util.h" |
23 | 23 |
24 namespace policy { | 24 namespace policy { |
25 | 25 |
26 class RestoreOnStartupPolicyHandlerTest : public testing::Test { | 26 class RestoreOnStartupPolicyHandlerTest : public testing::Test { |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 EXPECT_TRUE(prefs().GetValue(prefs::kURLsToRestoreOnStartup, &url_result)); | 279 EXPECT_TRUE(prefs().GetValue(prefs::kURLsToRestoreOnStartup, &url_result)); |
280 base::ListValue* url_list_result; | 280 base::ListValue* url_list_result; |
281 EXPECT_TRUE(url_result->GetAsList(&url_list_result)); | 281 EXPECT_TRUE(url_result->GetAsList(&url_list_result)); |
282 EXPECT_EQ(1U, url_list_result->GetSize()); | 282 EXPECT_EQ(1U, url_list_result->GetSize()); |
283 std::string expected_url; | 283 std::string expected_url; |
284 EXPECT_TRUE(url_list_result->GetString(0, &expected_url)); | 284 EXPECT_TRUE(url_list_result->GetString(0, &expected_url)); |
285 EXPECT_EQ(std::string("http://foo.com"), expected_url); | 285 EXPECT_EQ(std::string("http://foo.com"), expected_url); |
286 } | 286 } |
287 | 287 |
288 } // namespace policy | 288 } // namespace policy |
OLD | NEW |