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

Side by Side Diff: chrome/browser/extensions/app_notification_manager_sync_unittest.cc

Issue 11275009: Disable AppNotificationManagerSyncTest.ProcessSyncChangesIgnoreBad{Add,Updates} (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: break lines Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "chrome/browser/extensions/app_notification.h" 9 #include "chrome/browser/extensions/app_notification.h"
10 #include "chrome/browser/extensions/app_notification_manager.h" 10 #include "chrome/browser/extensions/app_notification_manager.h"
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 changes.push_back(CreateSyncChange( 564 changes.push_back(CreateSyncChange(
565 syncer::SyncChange::ACTION_ADD, CreateNotification(4))); 565 syncer::SyncChange::ACTION_ADD, CreateNotification(4)));
566 566
567 model()->ProcessSyncChanges(FROM_HERE, changes); 567 model()->ProcessSyncChanges(FROM_HERE, changes);
568 568
569 EXPECT_EQ(3U, model()->GetAllSyncData(syncer::APP_NOTIFICATIONS).size()); 569 EXPECT_EQ(3U, model()->GetAllSyncData(syncer::APP_NOTIFICATIONS).size());
570 EXPECT_EQ(2U, processor()->change_list_size()); 570 EXPECT_EQ(2U, processor()->change_list_size());
571 } 571 }
572 572
573 // Process sync changes should ignore a bad ADD. 573 // Process sync changes should ignore a bad ADD.
574 TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesIgnoreBadAdd) { 574 // Hangs: http://crbug.com/149712
575 TEST_F(AppNotificationManagerSyncTest,
576 DISABLED_ProcessSyncChangesIgnoreBadAdd) {
575 AppNotification* n1 = CreateNotification(1); 577 AppNotification* n1 = CreateNotification(1);
576 model()->Add(n1); 578 model()->Add(n1);
577 AppNotification* n2 = CreateNotification(2); 579 AppNotification* n2 = CreateNotification(2);
578 model()->Add(n2); 580 model()->Add(n2);
579 model()->MergeDataAndStartSyncing( 581 model()->MergeDataAndStartSyncing(
580 syncer::APP_NOTIFICATIONS, 582 syncer::APP_NOTIFICATIONS,
581 syncer::SyncDataList(), 583 syncer::SyncDataList(),
582 PassProcessor(), 584 PassProcessor(),
583 scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock())); 585 scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
584 586
(...skipping 27 matching lines...) Expand all
612 syncer::SyncChange::ACTION_DELETE, CreateNotification(3))); 614 syncer::SyncChange::ACTION_DELETE, CreateNotification(3)));
613 615
614 syncer::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes); 616 syncer::SyncError error = model()->ProcessSyncChanges(FROM_HERE, changes);
615 EXPECT_FALSE(error.IsSet()); 617 EXPECT_FALSE(error.IsSet());
616 618
617 EXPECT_EQ(2U, model()->GetAllSyncData(syncer::APP_NOTIFICATIONS).size()); 619 EXPECT_EQ(2U, model()->GetAllSyncData(syncer::APP_NOTIFICATIONS).size());
618 EXPECT_EQ(2U, processor()->change_list_size()); 620 EXPECT_EQ(2U, processor()->change_list_size());
619 } 621 }
620 622
621 // Process sync changes should ignore bad UPDATEs. 623 // Process sync changes should ignore bad UPDATEs.
622 TEST_F(AppNotificationManagerSyncTest, ProcessSyncChangesIgnoreBadUpdates) { 624 // Hangs: http://crbug.com/149712
625 TEST_F(AppNotificationManagerSyncTest,
626 DISABLED_ProcessSyncChangesIgnoreBadUpdates) {
623 AppNotification* n1 = CreateNotification(1); 627 AppNotification* n1 = CreateNotification(1);
624 model()->Add(n1); 628 model()->Add(n1);
625 AppNotification* n2 = CreateNotification(2); 629 AppNotification* n2 = CreateNotification(2);
626 model()->Add(n2); 630 model()->Add(n2);
627 model()->MergeDataAndStartSyncing( 631 model()->MergeDataAndStartSyncing(
628 syncer::APP_NOTIFICATIONS, 632 syncer::APP_NOTIFICATIONS,
629 syncer::SyncDataList(), 633 syncer::SyncDataList(),
630 PassProcessor(), 634 PassProcessor(),
631 scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock())); 635 scoped_ptr<syncer::SyncErrorFactory>(new syncer::SyncErrorFactoryMock()));
632 636
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 EXPECT_TRUE(processor()->ContainsGuid(n1->guid())); 750 EXPECT_TRUE(processor()->ContainsGuid(n1->guid()));
747 syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid()); 751 syncer::SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
748 AssertSyncChange(c1, syncer::SyncChange::ACTION_DELETE, *n1); 752 AssertSyncChange(c1, syncer::SyncChange::ACTION_DELETE, *n1);
749 syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid()); 753 syncer::SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
750 AssertSyncChange(c2, syncer::SyncChange::ACTION_DELETE, *n2); 754 AssertSyncChange(c2, syncer::SyncChange::ACTION_DELETE, *n2);
751 syncer::SyncChange c3 = processor()->GetChangeByGuid(n3->guid()); 755 syncer::SyncChange c3 = processor()->GetChangeByGuid(n3->guid());
752 AssertSyncChange(c3, syncer::SyncChange::ACTION_DELETE, *n3); 756 AssertSyncChange(c3, syncer::SyncChange::ACTION_DELETE, *n3);
753 } 757 }
754 758
755 } // namespace extensions 759 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698