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

Side by Side Diff: chrome/browser/download/download_dir_policy_handler_unittest.cc

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 years, 1 month 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 "base/values.h" 5 #include "base/values.h"
6 #include "chrome/browser/download/download_dir_policy_handler.h" 6 #include "chrome/browser/download/download_dir_policy_handler.h"
7 #include "chrome/browser/download/download_prefs.h" 7 #include "chrome/browser/download/download_prefs.h"
8 #include "chrome/browser/policy/configuration_policy_pref_store.h" 8 #include "chrome/browser/policy/configuration_policy_pref_store.h"
9 #include "chrome/browser/policy/configuration_policy_pref_store_unittest.h" 9 #include "chrome/browser/policy/configuration_policy_pref_store_unittest.h"
10 #include "chrome/browser/policy/policy_map.h"
11 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
11 #include "components/policy/core/common/policy_map.h"
12 #include "policy/policy_constants.h" 12 #include "policy/policy_constants.h"
13 13
14 class DownloadDirPolicyHandlerTest 14 class DownloadDirPolicyHandlerTest
15 : public policy::ConfigurationPolicyPrefStoreTest { 15 : public policy::ConfigurationPolicyPrefStoreTest {
16 public: 16 public:
17 virtual void SetUp() OVERRIDE { 17 virtual void SetUp() OVERRIDE {
18 handler_list_.AddHandler( 18 handler_list_.AddHandler(
19 make_scoped_ptr<policy::ConfigurationPolicyHandler>( 19 make_scoped_ptr<policy::ConfigurationPolicyHandler>(
20 new DownloadDirPolicyHandler)); 20 new DownloadDirPolicyHandler));
21 } 21 }
(...skipping 11 matching lines...) Expand all
33 33
34 // Setting a DownloadDirectory should disable the PromptForDownload pref. 34 // Setting a DownloadDirectory should disable the PromptForDownload pref.
35 const base::Value* value = NULL; 35 const base::Value* value = NULL;
36 EXPECT_TRUE(store_->GetValue(prefs::kPromptForDownload, &value)); 36 EXPECT_TRUE(store_->GetValue(prefs::kPromptForDownload, &value));
37 ASSERT_TRUE(value); 37 ASSERT_TRUE(value);
38 bool prompt_for_download = true; 38 bool prompt_for_download = true;
39 bool result = value->GetAsBoolean(&prompt_for_download); 39 bool result = value->GetAsBoolean(&prompt_for_download);
40 ASSERT_TRUE(result); 40 ASSERT_TRUE(result);
41 EXPECT_FALSE(prompt_for_download); 41 EXPECT_FALSE(prompt_for_download);
42 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698