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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 it != model_types.end(); ++it) { | 508 it != model_types.end(); ++it) { |
509 path.append(base::StringPrintf("%ctype=%d", joiner, | 509 path.append(base::StringPrintf("%ctype=%d", joiner, |
510 syncable::GetExtensionFieldNumberFromModelType(*it))); | 510 syncable::GetExtensionFieldNumberFromModelType(*it))); |
511 joiner = '&'; | 511 joiner = '&'; |
512 } | 512 } |
513 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); | 513 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); |
514 ASSERT_EQ(ASCIIToUTF16("Migration: 200"), | 514 ASSERT_EQ(ASCIIToUTF16("Migration: 200"), |
515 browser()->GetSelectedTabContents()->GetTitle()); | 515 browser()->GetSelectedTabContents()->GetTitle()); |
516 } | 516 } |
517 | 517 |
| 518 void LiveSyncTest::TriggerBirthdayError() { |
| 519 ASSERT_TRUE(ServerSupportsErrorTriggering()); |
| 520 std::string path = "chromiumsync/birthdayerror"; |
| 521 ui_test_utils::NavigateToURL(browser(), sync_server_.GetURL(path)); |
| 522 ASSERT_EQ(ASCIIToUTF16("Birthday error"), |
| 523 browser()->GetSelectedTabContents()->GetTitle()); |
| 524 } |
| 525 |
518 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, | 526 void LiveSyncTest::SetProxyConfig(net::URLRequestContextGetter* context_getter, |
519 const net::ProxyConfig& proxy_config) { | 527 const net::ProxyConfig& proxy_config) { |
520 base::WaitableEvent done(false, false); | 528 base::WaitableEvent done(false, false); |
521 BrowserThread::PostTask( | 529 BrowserThread::PostTask( |
522 BrowserThread::IO, | 530 BrowserThread::IO, |
523 FROM_HERE, | 531 FROM_HERE, |
524 new SetProxyConfigTask(&done, | 532 new SetProxyConfigTask(&done, |
525 context_getter, | 533 context_getter, |
526 proxy_config)); | 534 proxy_config)); |
527 done.Wait(); | 535 done.Wait(); |
528 } | 536 } |
OLD | NEW |