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 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 5 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
6 #define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 6 #define CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // Append command line flag to enable sync. | 52 // Append command line flag to enable sync. |
53 virtual void SetUpCommandLine(CommandLine* command_line) { | 53 virtual void SetUpCommandLine(CommandLine* command_line) { |
54 } | 54 } |
55 | 55 |
56 // Helper to get a handle on a bookmark in |m| when the url is known to be | 56 // Helper to get a handle on a bookmark in |m| when the url is known to be |
57 // unique. | 57 // unique. |
58 static const BookmarkNode* GetByUniqueURL(BookmarkModel* m, const GURL& url); | 58 static const BookmarkNode* GetByUniqueURL(BookmarkModel* m, const GURL& url); |
59 | 59 |
60 // Helper to ProfileManager::CreateProfile that handles path creation. | 60 // Helper to ProfileManager::CreateProfile that handles path creation. |
61 static Profile* MakeProfile(const std::wstring& name); | 61 static Profile* MakeProfile(const FilePath::CharType* name); |
62 | 62 |
63 // Utility to block (by running the current MessageLoop) until the model has | 63 // Utility to block (by running the current MessageLoop) until the model has |
64 // loaded. Note this is required instead of using m->BlockTillLoaded, as that | 64 // loaded. Note this is required instead of using m->BlockTillLoaded, as that |
65 // cannot be called from the main thread (deadlock will occur). | 65 // cannot be called from the main thread (deadlock will occur). |
66 static void BlockUntilLoaded(BookmarkModel* m); | 66 static void BlockUntilLoaded(BookmarkModel* m); |
67 | 67 |
68 protected: | 68 protected: |
69 std::string username_; | 69 std::string username_; |
70 std::string password_; | 70 std::string password_; |
71 | 71 |
72 virtual void SetUpInProcessBrowserTestFixture(); | 72 virtual void SetUpInProcessBrowserTestFixture(); |
73 virtual void TearDownInProcessBrowserTestFixture(); | 73 virtual void TearDownInProcessBrowserTestFixture(); |
74 | 74 |
75 private: | 75 private: |
76 // LiveBookmarksSyncTests need to make live DNS requests for access to | 76 // LiveBookmarksSyncTests need to make live DNS requests for access to |
77 // GAIA and sync server URLs under google.com. We use a scoped version | 77 // GAIA and sync server URLs under google.com. We use a scoped version |
78 // to override the default resolver while the test is active. | 78 // to override the default resolver while the test is active. |
79 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; | 79 scoped_ptr<net::ScopedDefaultHostResolverProc> mock_host_resolver_override_; |
80 | 80 |
81 DISALLOW_COPY_AND_ASSIGN(LiveSyncTest); | 81 DISALLOW_COPY_AND_ASSIGN(LiveSyncTest); |
82 }; | 82 }; |
83 | 83 |
84 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ | 84 #endif // CHROME_TEST_LIVE_SYNC_LIVE_SYNC_TEST_H_ |
OLD | NEW |