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

Unified Diff: chrome/browser/chromeos/login/update_screen_browsertest.cc

Issue 8399006: chromeos: Fix UpdateScreenTest.NoUpdate and TestUpdateAvailable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/update_screen_browsertest.cc
diff --git a/chrome/browser/chromeos/login/update_screen_browsertest.cc b/chrome/browser/chromeos/login/update_screen_browsertest.cc
index 07e6faeae7d83999b051749237554e2a8ef18b31..a88e20515bee2c94088f700a0f9c73d0672b83f1 100644
--- a/chrome/browser/chromeos/login/update_screen_browsertest.cc
+++ b/chrome/browser/chromeos/login/update_screen_browsertest.cc
@@ -111,16 +111,12 @@ IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestNoUpdate) {
update_screen_->SetIgnoreIdleStatus(true);
UpdateLibrary::Status status;
status.status = UPDATE_STATUS_IDLE;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(1)
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_CHECKING_FOR_UPDATE;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(1)
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_IDLE;
+ // status() will be called via ExitUpdate() called from
+ // UpdateStatusChanged().
EXPECT_CALL(*mock_update_library_, status())
.Times(AtLeast(1))
.WillRepeatedly(ReturnRef(status));
@@ -135,46 +131,25 @@ IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestUpdateAvailable) {
UpdateLibrary::Status status;
status.status = UPDATE_STATUS_UPDATE_AVAILABLE;
status.new_version = "latest and greatest";
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_DOWNLOADING;
status.download_progress = 0.0;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.download_progress = 0.5;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.download_progress = 1.0;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_VERIFYING;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_FINALIZING;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_UPDATED_NEED_REBOOT;
- EXPECT_CALL(*mock_update_library_, status())
- .Times(AtLeast(1))
- .WillRepeatedly(ReturnRef(status));
EXPECT_CALL(*mock_update_library_, RebootAfterUpdate())
.Times(1);
update_screen_->UpdateStatusChanged(status);
@@ -209,6 +184,8 @@ IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestErrorIssuingUpdateCheck) {
IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestErrorCheckingForUpdate) {
UpdateLibrary::Status status;
status.status = UPDATE_STATUS_ERROR;
+ // status() will be called via ExitUpdate() called from
+ // UpdateStatusChanged().
EXPECT_CALL(*mock_update_library_, status())
.Times(AtLeast(1))
.WillRepeatedly(ReturnRef(status));
@@ -222,12 +199,16 @@ IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestErrorUpdating) {
UpdateLibrary::Status status;
status.status = UPDATE_STATUS_UPDATE_AVAILABLE;
status.new_version = "latest and greatest";
+ // status() will be called via ExitUpdate() called from
+ // UpdateStatusChanged().
EXPECT_CALL(*mock_update_library_, status())
.Times(AtLeast(1))
.WillRepeatedly(ReturnRef(status));
update_screen_->UpdateStatusChanged(status);
status.status = UPDATE_STATUS_ERROR;
+ // status() will be called via ExitUpdate() called from
+ // UpdateStatusChanged().
EXPECT_CALL(*mock_update_library_, status())
.Times(AtLeast(1))
.WillRepeatedly(ReturnRef(status));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698