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

Side by Side Diff: chrome/test/live_sync/live_sync_test.cc

Issue 7477004: Simulate transient error and verify exponential backoff. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload before commit. Created 9 years, 4 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
« no previous file with comments | « chrome/test/live_sync/live_sync_test.h ('k') | chrome/test/live_sync/sync_errors_test.cc » ('j') | 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/test/live_sync/live_sync_test.h" 5 #include "chrome/test/live_sync/live_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/command_line.h" 10 #include "base/command_line.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 } 517 }
518 518
519 void LiveSyncTest::TriggerBirthdayError() { 519 void LiveSyncTest::TriggerBirthdayError() {
520 ASSERT_TRUE(ServerSupportsErrorTriggering()); 520 ASSERT_TRUE(ServerSupportsErrorTriggering());
521 std::string path = "chromiumsync/birthdayerror"; 521 std::string path = "chromiumsync/birthdayerror";
522 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); 522 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
523 ASSERT_EQ(ASCIIToUTF16("Birthday error"), 523 ASSERT_EQ(ASCIIToUTF16("Birthday error"),
524 browser()->GetSelectedTabContents()->GetTitle()); 524 browser()->GetSelectedTabContents()->GetTitle());
525 } 525 }
526 526
527 void LiveSyncTest::TriggerTransientError() {
528 ASSERT_TRUE(ServerSupportsErrorTriggering());
529 std::string path = "chromiumsync/transienterror";
530 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
531 ASSERT_EQ(ASCIIToUTF16("Transient error"),
532 browser()->GetSelectedTabContents()->GetTitle());
533 }
534
527 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 535 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
528 const net::ProxyConfig& proxy_config) { 536 const net::ProxyConfig& proxy_config) {
529 base::WaitableEvent done(false, false); 537 base::WaitableEvent done(false, false);
530 BrowserThread::PostTask( 538 BrowserThread::PostTask(
531 BrowserThread::IO, 539 BrowserThread::IO,
532 FROM_HERE, 540 FROM_HERE,
533 new SetProxyConfigTask(&done, 541 new SetProxyConfigTask(&done,
534 context_getter, 542 context_getter,
535 proxy_config)); 543 proxy_config));
536 done.Wait(); 544 done.Wait();
537 } 545 }
OLDNEW
« no previous file with comments | « chrome/test/live_sync/live_sync_test.h ('k') | chrome/test/live_sync/sync_errors_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698