OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/sync_setup_handler.h" | 5 #include "chrome/browser/ui/webui/sync_setup_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 EXPECT_EQ("SyncSetupOverlay.showSyncSetupPage", data.function_name); | 410 EXPECT_EQ("SyncSetupOverlay.showSyncSetupPage", data.function_name); |
411 std::string page; | 411 std::string page; |
412 ASSERT_TRUE(data.arg1->GetAsString(&page)); | 412 ASSERT_TRUE(data.arg1->GetAsString(&page)); |
413 EXPECT_EQ(page, "done"); | 413 EXPECT_EQ(page, "done"); |
414 } | 414 } |
415 | 415 |
416 scoped_ptr<Profile> profile_; | 416 scoped_ptr<Profile> profile_; |
417 ProfileSyncServiceMock* mock_pss_; | 417 ProfileSyncServiceMock* mock_pss_; |
418 GoogleServiceAuthError error_; | 418 GoogleServiceAuthError error_; |
419 // MessageLoop instance is required to work with OneShotTimer. | 419 // MessageLoop instance is required to work with OneShotTimer. |
420 MessageLoop message_loop_; | 420 base::MessageLoop message_loop_; |
421 SigninManagerBase* mock_signin_; | 421 SigninManagerBase* mock_signin_; |
422 TestWebUI web_ui_; | 422 TestWebUI web_ui_; |
423 scoped_ptr<TestingSyncSetupHandler> handler_; | 423 scoped_ptr<TestingSyncSetupHandler> handler_; |
424 }; | 424 }; |
425 | 425 |
426 TEST_P(SyncSetupHandlerTest, Basic) { | 426 TEST_P(SyncSetupHandlerTest, Basic) { |
427 } | 427 } |
428 | 428 |
429 TEST_P(SyncSetupHandlerTest, DisplayBasicLogin) { | 429 TEST_P(SyncSetupHandlerTest, DisplayBasicLogin) { |
430 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()) | 430 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()) |
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 ExpectConfig(); | 1322 ExpectConfig(); |
1323 const TestWebUI::CallData& data = web_ui_.call_data()[0]; | 1323 const TestWebUI::CallData& data = web_ui_.call_data()[0]; |
1324 DictionaryValue* dictionary; | 1324 DictionaryValue* dictionary; |
1325 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary)); | 1325 ASSERT_TRUE(data.arg2->GetAsDictionary(&dictionary)); |
1326 CheckBool(dictionary, "encryptAllData", true); | 1326 CheckBool(dictionary, "encryptAllData", true); |
1327 } | 1327 } |
1328 | 1328 |
1329 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, | 1329 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, |
1330 SyncSetupHandlerTest, | 1330 SyncSetupHandlerTest, |
1331 Values(true, false)); | 1331 Values(true, false)); |
OLD | NEW |