| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/test/data/resource.h" | |
| 6 #include "base/file_util.h" | 5 #include "base/file_util.h" |
| 7 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
| 8 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 9 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 10 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 11 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 12 #include "base/thread.h" | 11 #include "base/thread.h" |
| 13 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 14 #include "base/values.h" | 13 #include "base/values.h" |
| 15 #include "chrome/common/json_pref_store.h" | 14 #include "chrome/common/json_pref_store.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 140 |
| 142 // Serialize and compare to expected output. | 141 // Serialize and compare to expected output. |
| 143 FilePath output_file = input_file; | 142 FilePath output_file = input_file; |
| 144 FilePath golden_output_file = data_dir_.AppendASCII("write.golden.json"); | 143 FilePath golden_output_file = data_dir_.AppendASCII("write.golden.json"); |
| 145 ASSERT_TRUE(file_util::PathExists(golden_output_file)); | 144 ASSERT_TRUE(file_util::PathExists(golden_output_file)); |
| 146 ASSERT_TRUE(pref_store.WritePrefs()); | 145 ASSERT_TRUE(pref_store.WritePrefs()); |
| 147 MessageLoop::current()->RunAllPending(); | 146 MessageLoop::current()->RunAllPending(); |
| 148 EXPECT_TRUE(file_util::TextContentsEqual(golden_output_file, output_file)); | 147 EXPECT_TRUE(file_util::TextContentsEqual(golden_output_file, output_file)); |
| 149 ASSERT_TRUE(file_util::Delete(output_file, false)); | 148 ASSERT_TRUE(file_util::Delete(output_file, false)); |
| 150 } | 149 } |
| OLD | NEW |