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/api/storage/policy_value_store.h" | 5 #include "chrome/browser/extensions/api/storage/policy_value_store.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "chrome/browser/extensions/api/storage/settings_observer.h" | 13 #include "chrome/browser/extensions/api/storage/settings_observer.h" |
14 #include "chrome/browser/policy/external_data_fetcher.h" | |
15 #include "chrome/browser/policy/policy_map.h" | |
16 #include "chrome/browser/value_store/leveldb_value_store.h" | 14 #include "chrome/browser/value_store/leveldb_value_store.h" |
17 #include "chrome/browser/value_store/value_store_unittest.h" | 15 #include "chrome/browser/value_store/value_store_unittest.h" |
| 16 #include "components/policy/core/common/external_data_fetcher.h" |
| 17 #include "components/policy/core/common/policy_map.h" |
18 #include "content/public/test/test_browser_thread.h" | 18 #include "content/public/test/test_browser_thread.h" |
19 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 using testing::_; | 22 using testing::_; |
23 using testing::Mock; | 23 using testing::Mock; |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 | 26 |
27 namespace { | 27 namespace { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 Mock::VerifyAndClearExpectations(&observer_); | 221 Mock::VerifyAndClearExpectations(&observer_); |
222 | 222 |
223 // Don't notify when there aren't any changes. | 223 // Don't notify when there aren't any changes. |
224 EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); | 224 EXPECT_CALL(observer_, OnSettingsChanged(_, _, _)).Times(0); |
225 store_->SetCurrentPolicy(policies); | 225 store_->SetCurrentPolicy(policies); |
226 loop_.RunUntilIdle(); | 226 loop_.RunUntilIdle(); |
227 Mock::VerifyAndClearExpectations(&observer_); | 227 Mock::VerifyAndClearExpectations(&observer_); |
228 } | 228 } |
229 | 229 |
230 } // namespace extensions | 230 } // namespace extensions |
OLD | NEW |