OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 namespace { | 33 namespace { |
34 const char kUrl1[] = "http://www.google.com"; | 34 const char kUrl1[] = "http://www.google.com"; |
35 const char kUrl2[] = "http://map.google.com"; | 35 const char kUrl2[] = "http://map.google.com"; |
36 const char kUrl3[] = "http://plus.google.com"; | 36 const char kUrl3[] = "http://plus.google.com"; |
37 } // anonymous namespace | 37 } // anonymous namespace |
38 | 38 |
39 class SingleClientBackupRollbackTest : public SyncTest { | 39 class SingleClientBackupRollbackTest : public SyncTest { |
40 public: | 40 public: |
41 SingleClientBackupRollbackTest() : SyncTest(SINGLE_CLIENT) {} | 41 SingleClientBackupRollbackTest() : SyncTest(SINGLE_CLIENT) {} |
42 virtual ~SingleClientBackupRollbackTest() {} | 42 ~SingleClientBackupRollbackTest() override {} |
43 | 43 |
44 void DisableBackup() { | 44 void DisableBackup() { |
45 CommandLine::ForCurrentProcess()->AppendSwitch( | 45 CommandLine::ForCurrentProcess()->AppendSwitch( |
46 switches::kSyncDisableBackup); | 46 switches::kSyncDisableBackup); |
47 } | 47 } |
48 | 48 |
49 void DisableRollback() { | 49 void DisableRollback() { |
50 CommandLine::ForCurrentProcess()->AppendSwitch( | 50 CommandLine::ForCurrentProcess()->AppendSwitch( |
51 switches::kSyncDisableRollback); | 51 switches::kSyncDisableRollback); |
52 } | 52 } |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 ASSERT_TRUE(rollback_checker.Wait()); | 433 ASSERT_TRUE(rollback_checker.Wait()); |
434 SyncBackendStoppedChecker shutdown_checker(GetSyncService(0)); | 434 SyncBackendStoppedChecker shutdown_checker(GetSyncService(0)); |
435 ASSERT_TRUE(shutdown_checker.Wait()); | 435 ASSERT_TRUE(shutdown_checker.Wait()); |
436 | 436 |
437 // Verify bookmarks are unchanged. | 437 // Verify bookmarks are unchanged. |
438 ASSERT_EQ(3, sub_folder->child_count()); | 438 ASSERT_EQ(3, sub_folder->child_count()); |
439 ASSERT_EQ(GURL(kUrl1), sub_folder->GetChild(0)->url()); | 439 ASSERT_EQ(GURL(kUrl1), sub_folder->GetChild(0)->url()); |
440 ASSERT_EQ(GURL(kUrl2), sub_folder->GetChild(1)->url()); | 440 ASSERT_EQ(GURL(kUrl2), sub_folder->GetChild(1)->url()); |
441 ASSERT_EQ(GURL(kUrl3), sub_folder->GetChild(2)->url()); | 441 ASSERT_EQ(GURL(kUrl3), sub_folder->GetChild(2)->url()); |
442 } | 442 } |
OLD | NEW |