summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 19:59:11 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 19:59:11 +0000
commitc0101a0eace40d9c29f7673f69ee1e387df7e590 (patch)
tree910ca1d7ef6aa904136efc69edf160c19f6731e7
parent48329f9991ee2acf562abdd28e41c5597dc2c066 (diff)
downloadchromium_src-c0101a0eace40d9c29f7673f69ee1e387df7e590.zip
chromium_src-c0101a0eace40d9c29f7673f69ee1e387df7e590.tar.gz
chromium_src-c0101a0eace40d9c29f7673f69ee1e387df7e590.tar.bz2
[Sync] Remove flakiness in ProfileSyncServiceTest.JsFrontendProcessMessageBasic
BUG=77485 TEST= Review URL: http://codereview.chromium.org/6724041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79603 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/sync/profile_sync_service_unittest.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
index 057d25b..34b4c8e 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -992,6 +992,9 @@ TEST_F(ProfileSyncServiceTest,
HandleJsEvent("onSyncServiceStateChanged",
HasArgs(JsArgList()))).Times(AtLeast(3));
// For some reason, these events may or may not fire.
+ //
+ // TODO(akalin): Figure out exactly why there's non-determinism
+ // here, and if possible remove it.
EXPECT_CALL(event_handler, HandleJsEvent("onChangesApplied", _))
.Times(AtMost(1));
EXPECT_CALL(event_handler, HandleJsEvent("onChangesComplete", _))
@@ -1021,12 +1024,18 @@ TEST_F(ProfileSyncServiceTest,
EXPECT_EQ(NULL, test_backend->GetJsBackend()->GetParentJsEventRouter());
}
-// http://crbug.com/77485
-TEST_F(ProfileSyncServiceTest, FLAKY_JsFrontendProcessMessageBasic) {
+TEST_F(ProfileSyncServiceTest, JsFrontendProcessMessageBasic) {
LoadBookmarkModel(DELETE_EXISTING_STORAGE, DONT_SAVE_TO_STORAGE);
StartSyncService();
StrictMock<MockJsEventHandler> event_handler;
+ // For some reason, these events may or may not fire.
+ EXPECT_CALL(event_handler, HandleJsEvent("onChangesApplied", _))
+ .Times(AtMost(1));
+ EXPECT_CALL(event_handler, HandleJsEvent("onChangesComplete", _))
+ .Times(AtMost(1));
+ EXPECT_CALL(event_handler, HandleJsEvent("onSyncNotificationStateChange", _))
+ .Times(AtMost(1));
ListValue arg_list1;
arg_list1.Append(Value::CreateBooleanValue(true));