| 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 } | 653 } |
| 654 | 654 |
| 655 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { | 655 void SyncTest::TriggerNotification(syncer::ModelTypeSet changed_types) { |
| 656 ASSERT_TRUE(ServerSupportsNotificationControl()); | 656 ASSERT_TRUE(ServerSupportsNotificationControl()); |
| 657 const std::string& data = | 657 const std::string& data = |
| 658 syncer::P2PNotificationData( | 658 syncer::P2PNotificationData( |
| 659 "from_server", | 659 "from_server", |
| 660 syncer::NOTIFY_ALL, | 660 syncer::NOTIFY_ALL, |
| 661 syncer::ObjectIdSetToStateMap( | 661 syncer::ObjectIdSetToStateMap( |
| 662 syncer::ModelTypeSetToObjectIdSet(changed_types), ""), | 662 syncer::ModelTypeSetToObjectIdSet(changed_types), ""), |
| 663 syncer::REMOTE_NOTIFICATION).ToString(); | 663 syncer::REMOTE_INVALIDATION).ToString(); |
| 664 const std::string& path = | 664 const std::string& path = |
| 665 std::string("chromiumsync/sendnotification?channel=") + | 665 std::string("chromiumsync/sendnotification?channel=") + |
| 666 syncer::kSyncP2PNotificationChannel + "&data=" + data; | 666 syncer::kSyncP2PNotificationChannel + "&data=" + data; |
| 667 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); | 667 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); |
| 668 ASSERT_EQ("Notification sent", | 668 ASSERT_EQ("Notification sent", |
| 669 UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle())); | 669 UTF16ToASCII(chrome::GetActiveWebContents(browser())->GetTitle())); |
| 670 } | 670 } |
| 671 | 671 |
| 672 bool SyncTest::ServerSupportsErrorTriggering() const { | 672 bool SyncTest::ServerSupportsErrorTriggering() const { |
| 673 EXPECT_NE(SERVER_TYPE_UNDECIDED, server_type_); | 673 EXPECT_NE(SERVER_TYPE_UNDECIDED, server_type_); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 | 802 |
| 803 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 803 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
| 804 const net::ProxyConfig& proxy_config) { | 804 const net::ProxyConfig& proxy_config) { |
| 805 base::WaitableEvent done(false, false); | 805 base::WaitableEvent done(false, false); |
| 806 BrowserThread::PostTask( | 806 BrowserThread::PostTask( |
| 807 BrowserThread::IO, FROM_HERE, | 807 BrowserThread::IO, FROM_HERE, |
| 808 base::Bind(&SetProxyConfigCallback, &done, | 808 base::Bind(&SetProxyConfigCallback, &done, |
| 809 make_scoped_refptr(context_getter), proxy_config)); | 809 make_scoped_refptr(context_getter), proxy_config)); |
| 810 done.Wait(); | 810 done.Wait(); |
| 811 } | 811 } |
| OLD | NEW |