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 <stack> | 5 #include <stack> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.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/string16.h" | 14 #include "base/string16.h" |
15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
16 #include "chrome/browser/bookmarks/bookmark_model.h" | 16 #include "chrome/browser/bookmarks/bookmark_model.h" |
17 #include "chrome/browser/browser_thread.h" | 17 #include "chrome/browser/browser_thread.h" |
18 #include "chrome/browser/net/gaia/token_service.h" | 18 #include "chrome/browser/net/gaia/token_service.h" |
19 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
20 #include "chrome/browser/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/sync/engine/syncapi.h" | 21 #include "chrome/browser/sync/engine/syncapi.h" |
22 #include "chrome/browser/sync/glue/change_processor.h" | 22 #include "chrome/browser/sync/glue/change_processor.h" |
23 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 23 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
24 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" | 24 #include "chrome/browser/sync/glue/bookmark_data_type_controller.h" |
25 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 25 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
26 #include "chrome/browser/sync/glue/data_type_controller.h" | 26 #include "chrome/browser/sync/glue/data_type_controller.h" |
27 #include "chrome/browser/sync/glue/model_associator.h" | 27 #include "chrome/browser/sync/glue/model_associator.h" |
28 #include "chrome/browser/sync/glue/sync_backend_host.h" | 28 #include "chrome/browser/sync/glue/sync_backend_host.h" |
29 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" | 29 #include "chrome/browser/sync/glue/sync_backend_host_mock.h" |
30 #include "chrome/browser/sync/profile_sync_factory.h" | 30 #include "chrome/browser/sync/profile_sync_factory.h" |
(...skipping 1378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1409 // This file should have been deleted when the whole directory was nuked. | 1409 // This file should have been deleted when the whole directory was nuked. |
1410 ASSERT_FALSE(file_util::PathExists(sync_file3)); | 1410 ASSERT_FALSE(file_util::PathExists(sync_file3)); |
1411 ASSERT_FALSE(file_util::PathExists(sync_file1)); | 1411 ASSERT_FALSE(file_util::PathExists(sync_file1)); |
1412 | 1412 |
1413 // This will still exist, but the text should have changed. | 1413 // This will still exist, but the text should have changed. |
1414 ASSERT_TRUE(file_util::PathExists(sync_file2)); | 1414 ASSERT_TRUE(file_util::PathExists(sync_file2)); |
1415 std::string file2text; | 1415 std::string file2text; |
1416 file_util::ReadFileToString(sync_file2, &file2text); | 1416 file_util::ReadFileToString(sync_file2, &file2text); |
1417 ASSERT_FALSE(file2text.compare(nonsense2) == 0); | 1417 ASSERT_FALSE(file2text.compare(nonsense2) == 0); |
1418 } | 1418 } |
OLD | NEW |