| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } |
| OLD | NEW |