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

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 10874096: [Sync] Rework Invalidator-related unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 years, 3 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 "chrome/browser/sync/test/integration/sync_test.h" 5 #include "chrome/browser/sync/test/integration/sync_test.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 644 }
645 645
646 void SyncTest::EnableNotifications() { 646 void SyncTest::EnableNotifications() {
647 EnableNotificationsImpl(); 647 EnableNotificationsImpl();
648 notifications_enabled_ = true; 648 notifications_enabled_ = true;
649 } 649 }
650 650
651 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { 651 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) {
652 ASSERT_TRUE(ServerSupportsNotificationControl()); 652 ASSERT_TRUE(ServerSupportsNotificationControl());
653 const std::string& data = 653 const std::string& data =
654 syncer::P2PNotificationData("from_server", 654 syncer::P2PNotificationData(
655 syncer::NOTIFY_ALL, 655 "from_server",
656 changed_types).ToString(); 656 syncer::NOTIFY_ALL,
657 syncer::ObjectIdSetToStateMap(
658 syncer::ModelTypeSetToObjectIdSet(changed_types), ""),
659 syncer::REMOTE_NOTIFICATION).ToString();
657 const std::string& path = 660 const std::string& path =
658 std::string("chromiumsync/sendnotification?channel=") + 661 std::string("chromiumsync/sendnotification?channel=") +
659 syncer::kSyncP2PNotificationChannel + "&data=" + data; 662 syncer::kSyncP2PNotificationChannel + "&data=" + data;
660 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); 663 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
661 ASSERT_EQ("Notification sent", 664 ASSERT_EQ("Notification sent",
662 UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle())); 665 UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle()));
663 } 666 }
664 667
665 bool SyncTest::ServerSupportsErrorTriggering() const { 668 bool SyncTest::ServerSupportsErrorTriggering() const {
666 EXPECT_NE(SERVER_TYPE_UNDECIDED, server_type_); 669 EXPECT_NE(SERVER_TYPE_UNDECIDED, server_type_);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 798
796 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 799 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
797 const net::ProxyConfig& proxy_config) { 800 const net::ProxyConfig& proxy_config) {
798 base::WaitableEvent done(false, false); 801 base::WaitableEvent done(false, false);
799 BrowserThread::PostTask( 802 BrowserThread::PostTask(
800 BrowserThread::IO, FROM_HERE, 803 BrowserThread::IO, FROM_HERE,
801 base::Bind(&SetProxyConfigCallback, &done, 804 base::Bind(&SetProxyConfigCallback, &done,
802 make_scoped_refptr(context_getter), proxy_config)); 805 make_scoped_refptr(context_getter), proxy_config));
803 done.Wait(); 806 done.Wait();
804 } 807 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host.cc ('k') | sync/internal_api/public/base/invalidation_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698