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