OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/scoped_temp_dir.h" | |
9 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
10 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
11 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| 11 #include "base/scoped_temp_dir.h" |
12 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
13 #include "base/string_util.h" | 13 #include "base/string_util.h" |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "base/values.h" | 16 #include "base/values.h" |
17 #include "chrome/common/chrome_paths.h" | 17 #include "chrome/common/chrome_paths.h" |
18 #include "chrome/common/json_pref_store.h" | 18 #include "chrome/common/json_pref_store.h" |
19 #include "chrome/common/pref_names.h" | 19 #include "chrome/common/pref_names.h" |
20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 pref_store->ReadPrefsAsync(mock_error_delegate); | 237 pref_store->ReadPrefsAsync(mock_error_delegate); |
238 | 238 |
239 EXPECT_CALL(mock_observer, OnInitializationCompleted(true)).Times(1); | 239 EXPECT_CALL(mock_observer, OnInitializationCompleted(true)).Times(1); |
240 EXPECT_CALL(*mock_error_delegate, | 240 EXPECT_CALL(*mock_error_delegate, |
241 OnError(PersistentPrefStore::PREF_READ_ERROR_NO_FILE)).Times(1); | 241 OnError(PersistentPrefStore::PREF_READ_ERROR_NO_FILE)).Times(1); |
242 message_loop_.RunAllPending(); | 242 message_loop_.RunAllPending(); |
243 pref_store->RemoveObserver(&mock_observer); | 243 pref_store->RemoveObserver(&mock_observer); |
244 | 244 |
245 EXPECT_FALSE(pref_store->ReadOnly()); | 245 EXPECT_FALSE(pref_store->ReadOnly()); |
246 } | 246 } |
OLD | NEW |