Ignore title parameter for navigator.registerProtocolHandler
[chromium-blink-merge.git] / components / policy / core / common / preferences_mock_mac.h
blobf28f8fef59ac03530adeaf9fc9d23bfe7a53bc2a
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
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_
8 #include "base/mac/scoped_cftyperef.h"
9 #include "components/policy/core/common/preferences_mac.h"
10 #include "components/policy/policy_export.h"
12 // Mock preferences wrapper for testing code that interacts with CFPreferences.
13 class POLICY_EXPORT MockPreferences : public MacPreferences {
14 public:
15 MockPreferences();
16 virtual ~MockPreferences();
18 virtual Boolean AppSynchronize(CFStringRef applicationID) OVERRIDE;
20 virtual CFPropertyListRef CopyAppValue(CFStringRef key,
21 CFStringRef applicationID) OVERRIDE;
23 virtual Boolean AppValueIsForced(CFStringRef key,
24 CFStringRef applicationID) OVERRIDE;
26 // Adds a preference item with the given info to the test set.
27 void AddTestItem(CFStringRef key, CFPropertyListRef value, bool is_forced);
29 private:
30 base::ScopedCFTypeRef<CFMutableDictionaryRef> values_;
31 base::ScopedCFTypeRef<CFMutableSetRef> forced_;
34 #endif // COMPONENTS_POLICY_CORE_COMMON_PREFERENCES_MOCK_MAC_H_