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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), | 480 EXPECT_EQ(GoogleServiceAuthError::AuthErrorNone(), |
481 token_status.last_get_token_error); | 481 token_status.last_get_token_error); |
482 EXPECT_TRUE(token_status.next_token_request_time.is_null()); | 482 EXPECT_TRUE(token_status.next_token_request_time.is_null()); |
483 | 483 |
484 // Simulate successful connection. | 484 // Simulate successful connection. |
485 service()->OnConnectionStatusChange(syncer::CONNECTION_OK); | 485 service()->OnConnectionStatusChange(syncer::CONNECTION_OK); |
486 token_status = service()->GetSyncTokenStatus(); | 486 token_status = service()->GetSyncTokenStatus(); |
487 EXPECT_EQ(syncer::CONNECTION_OK, token_status.connection_status); | 487 EXPECT_EQ(syncer::CONNECTION_OK, token_status.connection_status); |
488 } | 488 } |
489 | 489 |
490 #if defined(OS_WIN) || defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_C
HROMEOS)) | 490 #if defined(ENABLE_PRE_SYNC_BACKUP) |
491 void QuitLoop() { | 491 void QuitLoop() { |
492 base::MessageLoop::current()->Quit(); | 492 base::MessageLoop::current()->Quit(); |
493 } | 493 } |
494 | 494 |
495 TEST_F(ProfileSyncServiceTest, StartBackup) { | 495 TEST_F(ProfileSyncServiceTest, StartBackup) { |
496 CreateServiceWithoutSignIn(); | 496 CreateServiceWithoutSignIn(); |
497 ExpectDataTypeManagerCreation(1); | 497 ExpectDataTypeManagerCreation(1); |
498 std::vector<bool> delete_dir_param; | 498 std::vector<bool> delete_dir_param; |
499 ExpectSyncBackendHostCreationCollectDeleteDir(1, &delete_dir_param); | 499 ExpectSyncBackendHostCreationCollectDeleteDir(1, &delete_dir_param); |
500 Initialize(); | 500 Initialize(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | 596 ProfileSyncService::GetSyncServiceURL(command_line).spec()); |
597 | 597 |
598 // See that we can override the URL with a flag. | 598 // See that we can override the URL with a flag. |
599 command_line.AppendSwitchASCII("--sync-url", "https://foo/bar"); | 599 command_line.AppendSwitchASCII("--sync-url", "https://foo/bar"); |
600 EXPECT_EQ("https://foo/bar", | 600 EXPECT_EQ("https://foo/bar", |
601 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | 601 ProfileSyncService::GetSyncServiceURL(command_line).spec()); |
602 } | 602 } |
603 | 603 |
604 } // namespace | 604 } // namespace |
605 } // namespace browser_sync | 605 } // namespace browser_sync |
OLD | NEW |