summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_regular/test/include
diff options
context:
space:
mode:
authorVladislav Antonov <vlantonov@luxoft.com>2016-12-13 09:57:52 +0200
committerVladislav Antonov <vlantonov@luxoft.com>2016-12-19 17:16:03 +0200
commitb7fab0eac542906e64fa9f94438dde2cd8b313dc (patch)
treea083a021593cfc39e3fa979e3ea19305bd1d5c7d /src/components/policy/policy_regular/test/include
parentfdc43e8eb6bcdf842bac744ed8f6eccb257d2589 (diff)
downloadsdl_core-b7fab0eac542906e64fa9f94438dde2cd8b313dc.tar.gz
Fix invalid PT after update
The calls to CheckSnapshotInitialization, IsPredataPolicy and IsDefaultPolicy methods of the PolicyManager introduced uninitialized values in the local Policy Table which in turn became invalid. This failed the following Policy Table Updates. The adding of uninitialized values was removed. Related Issue: APPLINK-30706
Diffstat (limited to 'src/components/policy/policy_regular/test/include')
-rw-r--r--src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h4
-rw-r--r--src/components/policy/policy_regular/test/include/policy/mock_policy_manager.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h b/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
index 2e7ca17708..bad04445ec 100644
--- a/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
+++ b/src/components/policy/policy_regular/test/include/policy/mock_cache_manager.h
@@ -94,9 +94,9 @@ class MockCacheManagerInterface : public CacheManagerInterface {
MOCK_METHOD1(GetFunctionalGroupings,
bool(policy_table::FunctionalGroupings& groups));
MOCK_CONST_METHOD1(IsApplicationRepresented, bool(const std::string& app_id));
- MOCK_METHOD1(IsDefaultPolicy, bool(const std::string& app_id));
+ MOCK_CONST_METHOD1(IsDefaultPolicy, bool(const std::string& app_id));
MOCK_METHOD1(SetIsDefault, bool(const std::string& app_id));
- MOCK_METHOD1(IsPredataPolicy, bool(const std::string& app_id));
+ MOCK_CONST_METHOD1(IsPredataPolicy, bool(const std::string& app_id));
MOCK_METHOD1(SetDefaultPolicy, bool(const std::string& app_id));
MOCK_CONST_METHOD1(CanAppKeepContext, bool(const std::string& app_id));
MOCK_CONST_METHOD1(CanAppStealFocus, bool(const std::string& app_id));
diff --git a/src/components/policy/policy_regular/test/include/policy/mock_policy_manager.h b/src/components/policy/policy_regular/test/include/policy/mock_policy_manager.h
index 61ef9f422d..ea931d1637 100644
--- a/src/components/policy/policy_regular/test/include/policy/mock_policy_manager.h
+++ b/src/components/policy/policy_regular/test/include/policy/mock_policy_manager.h
@@ -145,7 +145,7 @@ class MockPolicyManager : public PolicyManager {
MOCK_CONST_METHOD1(GetNotificationsNumber,
uint32_t(const std::string& priority));
MOCK_METHOD1(SetVINValue, void(const std::string& value));
- MOCK_METHOD1(IsPredataPolicy, bool(const std::string& policy_app_id));
+ MOCK_CONST_METHOD1(IsPredataPolicy, bool(const std::string& policy_app_id));
MOCK_CONST_METHOD1(HeartBeatTimeout, uint32_t(const std::string& app_id));
MOCK_METHOD1(SaveUpdateStatusRequired, void(bool is_update_needed));
MOCK_METHOD0(OnAppsSearchStarted, void());