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

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

Issue 23441042: Refactor common invalidation framework types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another browser test fix Created 7 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
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 EnableNotificationsImpl(); 669 EnableNotificationsImpl();
670 notifications_enabled_ = true; 670 notifications_enabled_ = true;
671 } 671 }
672 672
673 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { 673 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) {
674 ASSERT_TRUE(ServerSupportsNotificationControl()); 674 ASSERT_TRUE(ServerSupportsNotificationControl());
675 const std::string& data = 675 const std::string& data =
676 syncer::P2PNotificationData( 676 syncer::P2PNotificationData(
677 "from_server", 677 "from_server",
678 syncer::NOTIFY_ALL, 678 syncer::NOTIFY_ALL,
679 syncer::ObjectIdSetToInvalidationMap( 679 syncer::ObjectIdInvalidationMap::InvalidateAll(
680 syncer::ModelTypeSetToObjectIdSet(changed_types), 680 syncer::ModelTypeSetToObjectIdSet(changed_types))).ToString();
681 syncer::Invalidation::kUnknownVersion,
682 std::string())
683 ).ToString();
684 const std::string& path = 681 const std::string& path =
685 std::string("chromiumsync/sendnotification?channel=") + 682 std::string("chromiumsync/sendnotification?channel=") +
686 syncer::kSyncP2PNotificationChannel + "&data=" + data; 683 syncer::kSyncP2PNotificationChannel + "&data=" + data;
687 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); 684 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
688 ASSERT_EQ("Notification sent", 685 ASSERT_EQ("Notification sent",
689 UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()-> 686 UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()->
690 GetTitle())); 687 GetTitle()));
691 } 688 }
692 689
693 bool SyncTest::ServerSupportsErrorTriggering() const { 690 bool SyncTest::ServerSupportsErrorTriggering() const {
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 830
834 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 831 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
835 const net::ProxyConfig& proxy_config) { 832 const net::ProxyConfig& proxy_config) {
836 base::WaitableEvent done(false, false); 833 base::WaitableEvent done(false, false);
837 BrowserThread::PostTask( 834 BrowserThread::PostTask(
838 BrowserThread::IO, FROM_HERE, 835 BrowserThread::IO, FROM_HERE,
839 base::Bind(&SetProxyConfigCallback, &done, 836 base::Bind(&SetProxyConfigCallback, &done,
840 make_scoped_refptr(context_getter), proxy_config)); 837 make_scoped_refptr(context_getter), proxy_config));
841 done.Wait(); 838 done.Wait();
842 } 839 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698