summaryrefslogtreecommitdiffstats
path: root/chrome/test/live_sync
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 19:10:46 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 19:10:46 +0000
commitcc2de439d0fd34aac593b1fabc40f0626c5848e1 (patch)
tree0125fa134ad1ec78a588050b2da90dc63ca49871 /chrome/test/live_sync
parentacbf833a56ded0a8708aec37cc2e93a3e5072003 (diff)
downloadchromium_src-cc2de439d0fd34aac593b1fabc40f0626c5848e1.zip
chromium_src-cc2de439d0fd34aac593b1fabc40f0626c5848e1.tar.gz
chromium_src-cc2de439d0fd34aac593b1fabc40f0626c5848e1.tar.bz2
Bookmark sync tests need to wait for bookmarks to load in SetupClients().
The bookmark sync tests were not waiting for the BookmarkModel object in each Profile to load before running tests. Adding a call to ui_test_utils::WaitForBookmarkModelToLoad() to LiveBookmarksSyncTest::SetupClients(). Also including fixes for a couple of lint errors. BUG=47361 TEST=sync_integration_tests Review URL: http://codereview.chromium.org/2802019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50748 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/live_sync')
-rw-r--r--chrome/test/live_sync/live_bookmarks_sync_test.h4
-rw-r--r--chrome/test/live_sync/live_sync_test.h7
2 files changed, 10 insertions, 1 deletions
diff --git a/chrome/test/live_sync/live_bookmarks_sync_test.h b/chrome/test/live_sync/live_bookmarks_sync_test.h
index 650bd2f..7d52ab5 100644
--- a/chrome/test/live_sync/live_bookmarks_sync_test.h
+++ b/chrome/test/live_sync/live_bookmarks_sync_test.h
@@ -28,6 +28,10 @@ class LiveBookmarksSyncTest : public LiveSyncTest {
virtual bool SetupClients() {
if (!LiveSyncTest::SetupClients())
return false;
+ for (int i = 0; i < num_clients(); ++i) {
+ ui_test_utils::WaitForBookmarkModelToLoad(
+ GetProfile(i)->GetBookmarkModel());
+ }
verifier_helper_.reset(BookmarkModelVerifier::Create(
GetVerifierBookmarkModel()));
return (verifier_helper_.get() != NULL);
diff --git a/chrome/test/live_sync/live_sync_test.h b/chrome/test/live_sync/live_sync_test.h
index 7564c28..dcc4eb5 100644
--- a/chrome/test/live_sync/live_sync_test.h
+++ b/chrome/test/live_sync/live_sync_test.h
@@ -12,6 +12,8 @@
#include "net/base/mock_host_resolver.h"
#include "net/socket/ssl_test_util.h"
+#include <string>
+
class Profile;
class CommandLine;
@@ -89,6 +91,9 @@ class LiveSyncTest : public InProcessBrowserTest {
// Helper to ProfileManager::CreateProfile that handles path creation.
static Profile* MakeProfile(const FilePath::StringType name);
+ // Used to get the number of sync clients used by a test.
+ int num_clients() { return num_clients_; }
+
// Used to access a particular sync profile.
Profile* GetProfile(int index);
@@ -123,7 +128,7 @@ class LiveSyncTest : public InProcessBrowserTest {
// GAIA password used by the test case.
std::string password_;
-private:
+ private:
// Helper method used to create a local python test server.
virtual void SetUpLocalTestServer();