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

Side by Side Diff: chrome/browser/sync/sync_setup_wizard_unittest.cc

Issue 7466024: [Sync] Support receiving early passphrase required information in Sync UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed + fix unit test Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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/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/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 wizard_->Step(SyncSetupWizard::DONE); 388 wizard_->Step(SyncSetupWizard::DONE);
389 EXPECT_FALSE(wizard_->IsVisible()); 389 EXPECT_FALSE(wizard_->IsVisible());
390 390
391 wizard_->Step(SyncSetupWizard::GAIA_LOGIN); 391 wizard_->Step(SyncSetupWizard::GAIA_LOGIN);
392 AttachSyncSetupHandler(); 392 AttachSyncSetupHandler();
393 393
394 wizard_->Step(SyncSetupWizard::DONE); 394 wizard_->Step(SyncSetupWizard::DONE);
395 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_); 395 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_);
396 396
397 wizard_->Step(SyncSetupWizard::SETUP_ABORTED_BY_PENDING_CLEAR);
398 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_);
399
400 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS); 397 wizard_->Step(SyncSetupWizard::GAIA_SUCCESS);
401 wizard_->Step(SyncSetupWizard::SYNC_EVERYTHING); 398 wizard_->Step(SyncSetupWizard::SYNC_EVERYTHING);
402 EXPECT_EQ(SyncSetupWizard::SYNC_EVERYTHING, flow_->current_state_); 399 EXPECT_EQ(SyncSetupWizard::SYNC_EVERYTHING, flow_->current_state_);
403 400
404 wizard_->Step(SyncSetupWizard::FATAL_ERROR); 401 wizard_->Step(SyncSetupWizard::FATAL_ERROR);
405 EXPECT_EQ(SyncSetupWizard::FATAL_ERROR, flow_->current_state_); 402 EXPECT_EQ(SyncSetupWizard::FATAL_ERROR, flow_->current_state_);
406 CloseSetupUI(); 403 CloseSetupUI();
407 } 404 }
408 405
409 TEST_F(SyncSetupWizardTest, FullSuccessfulRunSetsPref) { 406 TEST_F(SyncSetupWizardTest, FullSuccessfulRunSetsPref) {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE)); 545 AuthError(GoogleServiceAuthError::SERVICE_UNAVAILABLE));
549 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR); 546 wizard_->Step(SyncSetupWizard::NONFATAL_ERROR);
550 AttachSyncSetupHandler(); 547 AttachSyncSetupHandler();
551 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_); 548 EXPECT_EQ(SyncSetupWizard::GAIA_LOGIN, flow_->current_state_);
552 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_); 549 EXPECT_EQ(SyncSetupWizard::DONE, flow_->end_state_);
553 CloseSetupUI(); 550 CloseSetupUI();
554 EXPECT_FALSE(wizard_->IsVisible()); 551 EXPECT_FALSE(wizard_->IsVisible());
555 } 552 }
556 553
557 #undef SKIP_TEST_ON_MACOSX 554 #undef SKIP_TEST_ON_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_setup_flow.cc ('k') | chrome/browser/ui/webui/options/sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698