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

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

Issue 8931013: Sync integration test for authentication errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years 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
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 } 615 }
616 616
617 void SyncTest::TriggerTransientError() { 617 void SyncTest::TriggerTransientError() {
618 ASSERT_TRUE(ServerSupportsErrorTriggering()); 618 ASSERT_TRUE(ServerSupportsErrorTriggering());
619 std::string path = "chromiumsync/transienterror"; 619 std::string path = "chromiumsync/transienterror";
620 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); 620 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
621 ASSERT_EQ("Transient error", 621 ASSERT_EQ("Transient error",
622 UTF16ToASCII(browser()->GetSelectedTabContents()->GetTitle())); 622 UTF16ToASCII(browser()->GetSelectedTabContents()->GetTitle()));
623 } 623 }
624 624
625 void SyncTest::TriggerAuthError() {
626 ASSERT_TRUE(ServerSupportsErrorTriggering());
627 std::string path = "chromiumsync/cred";
628 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
629 }
630
625 namespace { 631 namespace {
626 632
627 sync_pb::ClientToServerResponse::ErrorType 633 sync_pb::ClientToServerResponse::ErrorType
628 GetClientToServerResponseErrorType( 634 GetClientToServerResponseErrorType(
629 browser_sync::SyncProtocolErrorType error) { 635 browser_sync::SyncProtocolErrorType error) {
630 switch (error) { 636 switch (error) {
631 case browser_sync::SYNC_SUCCESS: 637 case browser_sync::SYNC_SUCCESS:
632 return sync_pb::ClientToServerResponse::SUCCESS; 638 return sync_pb::ClientToServerResponse::SUCCESS;
633 case browser_sync::NOT_MY_BIRTHDAY: 639 case browser_sync::NOT_MY_BIRTHDAY:
634 return sync_pb::ClientToServerResponse::NOT_MY_BIRTHDAY; 640 return sync_pb::ClientToServerResponse::NOT_MY_BIRTHDAY;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 718
713 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 719 void SyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
714 const net::ProxyConfig& proxy_config) { 720 const net::ProxyConfig& proxy_config) {
715 base::WaitableEvent done(false, false); 721 base::WaitableEvent done(false, false);
716 BrowserThread::PostTask( 722 BrowserThread::PostTask(
717 BrowserThread::IO, FROM_HERE, 723 BrowserThread::IO, FROM_HERE,
718 base::Bind(&SetProxyConfigCallback, &done, 724 base::Bind(&SetProxyConfigCallback, &done,
719 make_scoped_refptr(context_getter), proxy_config)); 725 make_scoped_refptr(context_getter), proxy_config));
720 done.Wait(); 726 done.Wait();
721 } 727 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698