OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/extensions/settings/policy_value_store.h" | 5 #include "chrome/browser/extensions/api/storage/policy_value_store.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "chrome/browser/extensions/settings/settings_observer.h" | 12 #include "chrome/browser/extensions/api/storage/settings_observer.h" |
13 #include "chrome/browser/policy/policy_map.h" | 13 #include "chrome/browser/policy/policy_map.h" |
14 #include "chrome/browser/value_store/leveldb_value_store.h" | 14 #include "chrome/browser/value_store/leveldb_value_store.h" |
15 #include "chrome/browser/value_store/value_store_unittest.h" | 15 #include "chrome/browser/value_store/value_store_unittest.h" |
16 #include "content/public/test/test_browser_thread.h" | 16 #include "content/public/test/test_browser_thread.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 using testing::_; | 20 using testing::_; |
21 using testing::Mock; | 21 using testing::Mock; |
22 | 22 |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 Mock::VerifyAndClearExpectations(&observer_); | 208 Mock::VerifyAndClearExpectations(&observer_); |
209 | 209 |
210 // Don't notify when there aren't changes. | 210 // Don't notify when there aren't changes. |
211 EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); | 211 EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); |
212 store_->SetCurrentPolicy(policies, true); | 212 store_->SetCurrentPolicy(policies, true); |
213 loop_.RunUntilIdle(); | 213 loop_.RunUntilIdle(); |
214 Mock::VerifyAndClearExpectations(&observer_); | 214 Mock::VerifyAndClearExpectations(&observer_); |
215 } | 215 } |
216 | 216 |
217 } // namespace extensions | 217 } // namespace extensions |
OLD | NEW |