Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: chrome/test/live_sync/live_bookmarks_sync_test.h

Issue 159728: Add browser/sync to the repository. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifdef CHROME_PERSONALIZATION
6
7 #ifndef CHROME_TEST_LIVE_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
8 #define CHROME_TEST_LIVE_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
9
10 #include <string>
11
12 #include "base/command_line.h"
13 #include "chrome/common/chrome_paths.h"
14 #include "chrome/common/chrome_switches.h"
15 #include "chrome/browser/sync/personalization.h"
16 #include "chrome/test/in_process_browser_test.h"
17 #include "googleurl/src/gurl.h"
18
19 class BookmarkModel;
20 class BookmarkNode;
21 class Profile;
22
23 // TODO(timsteele): This should be moved out of personalization_unit_tests into
24 // its own project that doesn't get run by default on the standard buildbot
25 // without a valid sync server set up.
26 class LiveBookmarksSyncTest : public InProcessBrowserTest {
27 public:
28 LiveBookmarksSyncTest() { }
29 ~LiveBookmarksSyncTest() { }
30
31 virtual void SetUp() {
32 // At this point, the browser hasn't been launched, and no services are
33 // available. But we can verify our command line parameters and fail
34 // early.
35 const CommandLine* cl = CommandLine::ForCurrentProcess();
36 username_ = WideToUTF8(cl->GetSwitchValue(switches::kSyncUserForTest));
37 password_ = WideToUTF8(cl->GetSwitchValue(switches::kSyncPasswordForTest));
38 ASSERT_FALSE(username_.empty()) << "Can't run live server test "
39 << "without specifying --" << switches::kSyncUserForTest;
40 ASSERT_FALSE(password_.empty()) << "Can't run live server test "
41 << "without specifying --" << switches::kSyncPasswordForTest;
42
43 // Yield control back to the InProcessBrowserTest framework.
44 InProcessBrowserTest::SetUp();
45 }
46
47 // Helper to get a handle on a bookmark in |m| when the url is known to be
48 // unique.
49 static const BookmarkNode* GetByUniqueURL(BookmarkModel* m, const GURL& url);
50
51 // Helper to ProfileManager::CreateProfile that handles path creation.
52 static Profile* MakeProfile(const string16& name);
53
54 // Utility to block (by running the current MessageLoop) until the model has
55 // loaded. Note this is required instead of using m->BlockTillLoaded, as that
56 // cannot be called from the main thread (deadlock will occur).
57 static void BlockUntilLoaded(BookmarkModel* m);
58
59 protected:
60 std::string username_;
61 std::string password_;
62
63 private:
64 DISALLOW_COPY_AND_ASSIGN(LiveBookmarksSyncTest);
65 };
66
67 #endif // CHROME_TEST_SYNC_LIVE_BOOKMARKS_SYNC_TEST_H_
68
69 #endif // CHROME_PERSONALIZATION
OLDNEW
« no previous file with comments | « chrome/test/live_sync/bookmark_model_verifier.cc ('k') | chrome/test/live_sync/live_bookmarks_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698