Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: chrome/browser/ui/webui/sync_setup_handler_unittest.cc

Issue 11824021: [sync] [chromeos] Fix setup flow when sync data is cleared via dashboard and sync is set up again (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Disable unittests that behave differently based on whether client login flow is enabled or not. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 } 514 }
515 515
516 handler_->CloseSyncSetup(); 516 handler_->CloseSyncSetup();
517 EXPECT_EQ(NULL, 517 EXPECT_EQ(NULL,
518 LoginUIServiceFactory::GetForProfile( 518 LoginUIServiceFactory::GetForProfile(
519 profile_.get())->current_login_ui()); 519 profile_.get())->current_login_ui());
520 } 520 }
521 521
522 // Verifies that the handler correctly handles a cancellation when 522 // Verifies that the handler correctly handles a cancellation when
523 // it is displaying the spinner to the user. 523 // it is displaying the spinner to the user.
524 TEST_P(SyncSetupHandlerTest, DisplayConfigureWithBackendDisabledAndCancel) { 524 TEST_P(SyncSetupHandlerTest,
525 DISABLED_DisplayConfigureWithBackendDisabledAndCancel) {
525 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()) 526 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn())
526 .WillRepeatedly(Return(true)); 527 .WillRepeatedly(Return(true));
527 EXPECT_CALL(*mock_pss_, IsSyncTokenAvailable()) 528 EXPECT_CALL(*mock_pss_, IsSyncTokenAvailable())
528 .WillRepeatedly(Return(true)); 529 .WillRepeatedly(Return(true));
529 EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted()) 530 EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
530 .WillRepeatedly(Return(false)); 531 .WillRepeatedly(Return(false));
531 error_ = GoogleServiceAuthError::None(); 532 error_ = GoogleServiceAuthError::None();
532 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_)); 533 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_));
533 EXPECT_CALL(*mock_pss_, sync_initialized()).WillRepeatedly(Return(false)); 534 EXPECT_CALL(*mock_pss_, sync_initialized()).WillRepeatedly(Return(false));
534 535
(...skipping 15 matching lines...) Expand all
550 // Cancelling the spinner dialog will cause CloseSyncSetup(). 551 // Cancelling the spinner dialog will cause CloseSyncSetup().
551 handler_->CloseSyncSetup(); 552 handler_->CloseSyncSetup();
552 EXPECT_EQ(NULL, 553 EXPECT_EQ(NULL,
553 LoginUIServiceFactory::GetForProfile( 554 LoginUIServiceFactory::GetForProfile(
554 profile_.get())->current_login_ui()); 555 profile_.get())->current_login_ui());
555 } 556 }
556 557
557 // Verifies that the handler correctly transitions from showing the spinner 558 // Verifies that the handler correctly transitions from showing the spinner
558 // to showing a configuration page when signin completes successfully. 559 // to showing a configuration page when signin completes successfully.
559 TEST_P(SyncSetupHandlerTest, 560 TEST_P(SyncSetupHandlerTest,
560 DisplayConfigureWithBackendDisabledAndSigninSuccess) { 561 DISABLED_DisplayConfigureWithBackendDisabledAndSigninSuccess) {
Roger Tawa OOO till Jul 10th 2013/01/09 15:03:23 Instead of always disabling this test, you should
James Hawkins 2013/01/09 18:27:47 Yeah, I can't LG adding a disabled test.
561 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn()) 562 EXPECT_CALL(*mock_pss_, IsSyncEnabledAndLoggedIn())
562 .WillRepeatedly(Return(true)); 563 .WillRepeatedly(Return(true));
563 EXPECT_CALL(*mock_pss_, IsSyncTokenAvailable()) 564 EXPECT_CALL(*mock_pss_, IsSyncTokenAvailable())
564 .WillRepeatedly(Return(true)); 565 .WillRepeatedly(Return(true));
565 EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted()) 566 EXPECT_CALL(*mock_pss_, HasSyncSetupCompleted())
566 .WillRepeatedly(Return(false)); 567 .WillRepeatedly(Return(false));
567 error_ = GoogleServiceAuthError::None(); 568 error_ = GoogleServiceAuthError::None();
568 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_)); 569 EXPECT_CALL(*mock_pss_, GetAuthError()).WillRepeatedly(ReturnRef(error_));
569 // Sync backend is stopped initially, and will start up. 570 // Sync backend is stopped initially, and will start up.
570 EXPECT_CALL(*mock_pss_, sync_initialized()) 571 EXPECT_CALL(*mock_pss_, sync_initialized())
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 dictionary, err, false, GoogleServiceAuthError::NONE, "", true, ""); 1260 dictionary, err, false, GoogleServiceAuthError::NONE, "", true, "");
1260 handler_->CloseSyncSetup(); 1261 handler_->CloseSyncSetup();
1261 EXPECT_EQ(NULL, 1262 EXPECT_EQ(NULL,
1262 LoginUIServiceFactory::GetForProfile( 1263 LoginUIServiceFactory::GetForProfile(
1263 profile_.get())->current_login_ui()); 1264 profile_.get())->current_login_ui());
1264 } 1265 }
1265 1266
1266 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam, 1267 INSTANTIATE_TEST_CASE_P(SyncSetupHandlerTestWithParam,
1267 SyncSetupHandlerTest, 1268 SyncSetupHandlerTest,
1268 Values(true, false)); 1269 Values(true, false));
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698