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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 EXPECT_TRUE(sync_prefs.GetFirstSyncTime().is_null()); | 579 EXPECT_TRUE(sync_prefs.GetFirstSyncTime().is_null()); |
580 | 580 |
581 EXPECT_EQ(3u, delete_dir_param.size()); | 581 EXPECT_EQ(3u, delete_dir_param.size()); |
582 EXPECT_FALSE(delete_dir_param[0]); | 582 EXPECT_FALSE(delete_dir_param[0]); |
583 EXPECT_FALSE(delete_dir_param[1]); | 583 EXPECT_FALSE(delete_dir_param[1]); |
584 EXPECT_TRUE(delete_dir_param[2]); | 584 EXPECT_TRUE(delete_dir_param[2]); |
585 } | 585 } |
586 #endif | 586 #endif |
587 | 587 |
588 TEST_F(ProfileSyncServiceTest, GetSyncServiceURL) { | 588 TEST_F(ProfileSyncServiceTest, GetSyncServiceURL) { |
589 CommandLine command_line(*CommandLine::ForCurrentProcess()); | |
590 | |
591 // See that it defaults to a "dev" URL. | |
592 // | |
593 // Yes, we're hardcoding the URL here so this test will have to be updated | |
594 // when/if the URL ever changes. | |
595 EXPECT_EQ("https://clients4.google.com/chrome-sync/dev", | |
596 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | |
597 | |
598 // See that we can override the URL with a flag. | 589 // See that we can override the URL with a flag. |
599 command_line.AppendSwitchASCII("--sync-url", "https://foo/bar"); | 590 CommandLine command_line( |
| 591 base::FilePath(base::FilePath(FILE_PATH_LITERAL("chrome.exe")))); |
| 592 command_line.AppendSwitchASCII(switches::kSyncServiceURL, "https://foo/bar"); |
600 EXPECT_EQ("https://foo/bar", | 593 EXPECT_EQ("https://foo/bar", |
601 ProfileSyncService::GetSyncServiceURL(command_line).spec()); | 594 ProfileSyncService::GetSyncServiceURL(command_line).spec()); |
602 } | 595 } |
603 | 596 |
604 } // namespace | 597 } // namespace |
605 } // namespace browser_sync | 598 } // namespace browser_sync |
OLD | NEW |