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

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

Issue 9668028: [Sync] Create new top-level sync/ directory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync to head Created 8 years, 9 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
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"
11 #include "chrome/browser/sync/protocol/app_notification_specifics.pb.h"
12 #include "chrome/browser/sync/protocol/sync.pb.h"
13 #include "chrome/test/base/testing_profile.h" 11 #include "chrome/test/base/testing_profile.h"
14 #include "content/test/test_browser_thread.h" 12 #include "content/test/test_browser_thread.h"
13 #include "sync/protocol/app_notification_specifics.pb.h"
14 #include "sync/protocol/sync.pb.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 using content::BrowserThread; 17 using content::BrowserThread;
18 18
19 namespace { 19 namespace {
20 20
21 // Extract notification guid from SyncData. 21 // Extract notification guid from SyncData.
22 std::string GetGuid(const SyncData& sync_data) { 22 std::string GetGuid(const SyncData& sync_data) {
23 return sync_data.GetSpecifics().app_notification().guid(); 23 return sync_data.GetSpecifics().app_notification().guid();
24 } 24 }
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 610
611 EXPECT_EQ(3, processor()->change_list_size()); 611 EXPECT_EQ(3, processor()->change_list_size());
612 EXPECT_TRUE(processor()->ContainsGuid(n1->guid())); 612 EXPECT_TRUE(processor()->ContainsGuid(n1->guid()));
613 SyncChange c1 = processor()->GetChangeByGuid(n1->guid()); 613 SyncChange c1 = processor()->GetChangeByGuid(n1->guid());
614 AssertSyncChange(c1, SyncChange::ACTION_DELETE, *n1); 614 AssertSyncChange(c1, SyncChange::ACTION_DELETE, *n1);
615 SyncChange c2 = processor()->GetChangeByGuid(n2->guid()); 615 SyncChange c2 = processor()->GetChangeByGuid(n2->guid());
616 AssertSyncChange(c2, SyncChange::ACTION_DELETE, *n2); 616 AssertSyncChange(c2, SyncChange::ACTION_DELETE, *n2);
617 SyncChange c3 = processor()->GetChangeByGuid(n3->guid()); 617 SyncChange c3 = processor()->GetChangeByGuid(n3->guid());
618 AssertSyncChange(c3, SyncChange::ACTION_DELETE, *n3); 618 AssertSyncChange(c3, SyncChange::ACTION_DELETE, *n3);
619 } 619 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notification_manager.cc ('k') | chrome/browser/extensions/extension_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698