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

Unified Diff: chrome/test/live_sync/live_sync_test.cc

Issue 7259005: Allow sync integration tests to operate on multiple datatypes: Preferences + Bookmarks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/live_sync/live_sync_test.cc
diff --git a/chrome/test/live_sync/live_sync_test.cc b/chrome/test/live_sync/live_sync_test.cc
index 910c2f22dc08c954b2361d3d0725450bce3bba8c..04152f41c2a1ef0b778a1b88b2fcc77c382cbfd9 100644
--- a/chrome/test/live_sync/live_sync_test.cc
+++ b/chrome/test/live_sync/live_sync_test.cc
@@ -24,6 +24,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/test/live_sync/sync_datatype_helper.h"
#include "chrome/test/testing_browser_process.h"
#include "chrome/test/ui_test_utils.h"
#include "content/browser/browser_thread.h"
@@ -109,8 +110,10 @@ LiveSyncTest::LiveSyncTest(TestType test_type)
test_type_(test_type),
server_type_(SERVER_TYPE_UNDECIDED),
num_clients_(-1),
+ use_verifier_(true),
test_server_handle_(base::kNullProcessHandle) {
InProcessBrowserTest::set_show_window(true);
+ SyncDatatypeHelper::AssociateWithTest(this);
switch (test_type_) {
case SINGLE_CLIENT: {
num_clients_ = 1;
@@ -247,6 +250,10 @@ Profile* LiveSyncTest::verifier() {
return verifier_.get();
}
+void LiveSyncTest::DisableVerifier() {
+ use_verifier_ = false;
+}
+
bool LiveSyncTest::SetupClients() {
if (num_clients_ <= 0)
LOG(FATAL) << "num_clients_ incorrectly initialized.";
@@ -264,10 +271,13 @@ bool LiveSyncTest::SetupClients() {
clients_.push_back(
new ProfileSyncServiceHarness(GetProfile(i), username_, password_));
EXPECT_FALSE(GetClient(i) == NULL) << "GetClient(" << i << ") failed.";
+ ui_test_utils::WaitForBookmarkModelToLoad(
+ GetProfile(i)->GetBookmarkModel());
}
// Create the verifier profile.
verifier_.reset(MakeProfile(FILE_PATH_LITERAL("Verifier")));
+ ui_test_utils::WaitForBookmarkModelToLoad(verifier()->GetBookmarkModel());
return (verifier_.get() != NULL);
}

Powered by Google App Engine
This is Rietveld 408576698