OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/sync/sync_setup_wizard.h" | 5 #include "chrome/browser/sync/sync_setup_wizard.h" |
6 | 6 |
7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/stl_util-inl.h" | 9 #include "base/stl_util-inl.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/browser.h" | |
12 #include "chrome/browser/browser_list.h" | |
13 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/sync/profile_sync_factory_mock.h" | 12 #include "chrome/browser/sync/profile_sync_factory_mock.h" |
15 #include "chrome/browser/sync/profile_sync_service.h" | 13 #include "chrome/browser/sync/profile_sync_service.h" |
16 #include "chrome/browser/sync/sync_setup_flow.h" | 14 #include "chrome/browser/sync/sync_setup_flow.h" |
| 15 #include "chrome/browser/ui/browser.h" |
| 16 #include "chrome/browser/ui/browser_list.h" |
17 #include "chrome/common/net/gaia/google_service_auth_error.h" | 17 #include "chrome/common/net/gaia/google_service_auth_error.h" |
18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
19 #include "chrome/test/browser_with_test_window_test.h" | 19 #include "chrome/test/browser_with_test_window_test.h" |
| 20 #include "chrome/test/test_browser_window.h" |
20 #include "chrome/test/testing_profile.h" | 21 #include "chrome/test/testing_profile.h" |
21 #include "chrome/test/test_browser_window.h" | |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 static const char kTestUser[] = "chrome.p13n.test@gmail.com"; | 24 static const char kTestUser[] = "chrome.p13n.test@gmail.com"; |
25 static const char kTestPassword[] = "passwd"; | 25 static const char kTestPassword[] = "passwd"; |
26 static const char kTestCaptcha[] = "pizzamyheart"; | 26 static const char kTestCaptcha[] = "pizzamyheart"; |
27 static const char kTestCaptchaUrl[] = "http://pizzamyheart/"; | 27 static const char kTestCaptchaUrl[] = "http://pizzamyheart/"; |
28 | 28 |
29 typedef GoogleServiceAuthError AuthError; | 29 typedef GoogleServiceAuthError AuthError; |
30 | 30 |
31 // A PSS subtype to inject. | 31 // A PSS subtype to inject. |
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 int error = -1; | 517 int error = -1; |
518 dialog_args.GetInteger("error", &error); | 518 dialog_args.GetInteger("error", &error); |
519 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error); | 519 EXPECT_EQ(static_cast<int>(AuthError::INVALID_GAIA_CREDENTIALS), error); |
520 service_->set_auth_state(kTestUser, AuthError::None()); | 520 service_->set_auth_state(kTestUser, AuthError::None()); |
521 | 521 |
522 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); | 522 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); |
523 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled()); | 523 EXPECT_TRUE(test_window_->TestAndResetWasShowHTMLDialogCalled()); |
524 } | 524 } |
525 | 525 |
526 #undef SKIP_TEST_ON_MACOSX | 526 #undef SKIP_TEST_ON_MACOSX |
OLD | NEW |