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

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: For review. Created 9 years, 5 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) 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 } 511 }
512 512
513 void LiveSyncTest::TriggerBirthdayError() { 513 void LiveSyncTest::TriggerBirthdayError() {
514 ASSERT_TRUE(ServerSupportsErrorTriggering()); 514 ASSERT_TRUE(ServerSupportsErrorTriggering());
515 std::string path = "chromiumsync/birthdayerror"; 515 std::string path = "chromiumsync/birthdayerror";
516 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); 516 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
517 ASSERT_EQ(ASCIIToUTF16("Birthday error"), 517 ASSERT_EQ(ASCIIToUTF16("Birthday error"),
518 browser()->GetSelectedTabContents()->GetTitle()); 518 browser()->GetSelectedTabContents()->GetTitle());
519 } 519 }
520 520
521 void LiveSyncTest::TriggerTransientError() {
522 ASSERT_TRUE(ServerSupportsErrorTriggering());
523 std::string path = "chromiumsync/transienterror";
524 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path));
525 ASSERT_EQ(ASCIIToUTF16("Transient error"),
526 browser()->GetSelectedTabContents()->GetTitle());
527 }
528
521 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, 529 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter,
522 const net::ProxyConfig& proxy_config) { 530 const net::ProxyConfig& proxy_config) {
523 base::WaitableEvent done(false, false); 531 base::WaitableEvent done(false, false);
524 BrowserThread::PostTask( 532 BrowserThread::PostTask(
525 BrowserThread::IO, 533 BrowserThread::IO,
526 FROM_HERE, 534 FROM_HERE,
527 new SetProxyConfigTask(&done, 535 new SetProxyConfigTask(&done,
528 context_getter, 536 context_getter,
529 proxy_config)); 537 proxy_config));
530 done.Wait(); 538 done.Wait();
531 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698