Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 664 notifications_enabled_ = true; | 664 notifications_enabled_ = true; |
| 665 } | 665 } |
| 666 | 666 |
| 667 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { | 667 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { |
| 668 ASSERT_TRUE(ServerSupportsNotificationControl()); | 668 ASSERT_TRUE(ServerSupportsNotificationControl()); |
| 669 const std::string& data = | 669 const std::string& data = |
| 670 syncer::P2PNotificationData( | 670 syncer::P2PNotificationData( |
| 671 "from_server", | 671 "from_server", |
| 672 syncer::NOTIFY_ALL, | 672 syncer::NOTIFY_ALL, |
| 673 syncer::ObjectIdSetToInvalidationMap( | 673 syncer::ObjectIdSetToInvalidationMap( |
| 674 syncer::ModelTypeSetToObjectIdSet(changed_types), std::string()) | 674 syncer::ModelTypeSetToObjectIdSet(changed_types), |
| 675 syncer::Invalidation::UNKNOWN_VERSION, | |
|
rlarocque
2013/07/16 18:33:16
kUnknownVersion?
Steve Condie
2013/07/16 21:23:06
Thanks. Missed this because I didn't build the syn
rlarocque
2013/07/16 21:33:37
The existence of sync_endtoend_tests is news to me
Steve Condie
2013/07/16 21:49:47
Done.
| |
| 676 std::string()) | |
| 675 ).ToString(); | 677 ).ToString(); |
| 676 const std::string& path = | 678 const std::string& path = |
| 677 std::string("chromiumsync/sendnotification?channel=") + | 679 std::string("chromiumsync/sendnotification?channel=") + |
| 678 syncer::kSyncP2PNotificationChannel + "&data=" + data; | 680 syncer::kSyncP2PNotificationChannel + "&data=" + data; |
| 679 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); | 681 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); |
| 680 ASSERT_EQ("Notification sent", | 682 ASSERT_EQ("Notification sent", |
| 681 UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()-> | 683 UTF16ToASCII(browser()->tab_strip_model()->GetActiveWebContents()-> |
| 682 GetTitle())); | 684 GetTitle())); |
| 683 } | 685 } |
| 684 | 686 |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 | 827 |
| 826 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 828 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 827 const net::ProxyConfig& proxy_config) { | 829 const net::ProxyConfig& proxy_config) { |
| 828 base::WaitableEvent done(false, false); | 830 base::WaitableEvent done(false, false); |
| 829 BrowserThread::PostTask( | 831 BrowserThread::PostTask( |
| 830 BrowserThread::IO, FROM_HERE, | 832 BrowserThread::IO, FROM_HERE, |
| 831 base::Bind(&SetProxyConfigCallback, &done, | 833 base::Bind(&SetProxyConfigCallback, &done, |
| 832 make_scoped_refptr(context_getter), proxy_config)); | 834 make_scoped_refptr(context_getter), proxy_config)); |
| 833 done.Wait(); | 835 done.Wait(); |
| 834 } | 836 } |
| OLD | NEW |