Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Side by Side Diff: chrome/browser/sessions/restore_on_startup_policy_handler_unittest.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/sessions/restore_on_startup_policy_handler.h ('k') | chrome/browser/sync/sync_policy_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698