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

Side by Side Diff: chrome/browser/chromeos/login/update_screen_browsertest.cc

Issue 7057055: Show progress bar as soon as update state changed to UPDATE_STATUS_UPDATE_AVAILABLE (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed test again Created 9 years, 6 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/chromeos/cros/mock_login_library.h" 5 #include "chrome/browser/chromeos/cros/mock_login_library.h"
6 #include "chrome/browser/chromeos/cros/mock_network_library.h" 6 #include "chrome/browser/chromeos/cros/mock_network_library.h"
7 #include "chrome/browser/chromeos/cros/mock_update_library.h" 7 #include "chrome/browser/chromeos/cros/mock_update_library.h"
8 #include "chrome/browser/chromeos/login/mock_screen_observer.h" 8 #include "chrome/browser/chromeos/login/mock_screen_observer.h"
9 #include "chrome/browser/chromeos/login/update_screen.h" 9 #include "chrome/browser/chromeos/login/update_screen.h"
10 #include "chrome/browser/chromeos/login/wizard_controller.h" 10 #include "chrome/browser/chromeos/login/wizard_controller.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 private: 95 private:
96 DISALLOW_COPY_AND_ASSIGN(UpdateScreenTest); 96 DISALLOW_COPY_AND_ASSIGN(UpdateScreenTest);
97 }; 97 };
98 98
99 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestBasic) { 99 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestBasic) {
100 ASSERT_TRUE(update_screen_->actor_ != NULL); 100 ASSERT_TRUE(update_screen_->actor_ != NULL);
101 } 101 }
102 102
103 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestNoUpdate) { 103 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestNoUpdate) {
104 update_screen_->SetIgnoreIdleStatus(true);
104 UpdateLibrary::Status status; 105 UpdateLibrary::Status status;
105 status.status = UPDATE_STATUS_IDLE; 106 status.status = UPDATE_STATUS_IDLE;
106 EXPECT_CALL(*mock_update_library_, status()) 107 EXPECT_CALL(*mock_update_library_, status())
108 .Times(1)
109 .WillRepeatedly(ReturnRef(status));
110 update_screen_->UpdateStatusChanged(mock_update_library_);
111 status.status = UPDATE_STATUS_CHECKING_FOR_UPDATE;
112 EXPECT_CALL(*mock_update_library_, status())
113 .Times(1)
114 .WillRepeatedly(ReturnRef(status));
115 update_screen_->UpdateStatusChanged(mock_update_library_);
116 status.status = UPDATE_STATUS_IDLE;
117 EXPECT_CALL(*mock_update_library_, status())
107 .Times(AtLeast(1)) 118 .Times(AtLeast(1))
108 .WillRepeatedly(ReturnRef(status)); 119 .WillRepeatedly(ReturnRef(status));
109 EXPECT_CALL(*mock_screen_observer_, OnExit(ScreenObserver::UPDATE_NOUPDATE)) 120 EXPECT_CALL(*mock_screen_observer_, OnExit(ScreenObserver::UPDATE_NOUPDATE))
110 .Times(1); 121 .Times(1);
111 update_screen_->UpdateStatusChanged(mock_update_library_); 122 update_screen_->UpdateStatusChanged(mock_update_library_);
112 } 123 }
113 124
114 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestUpdateAvailable) { 125 IN_PROC_BROWSER_TEST_F(UpdateScreenTest, TestUpdateAvailable) {
115 update_screen_->is_ignore_update_deadlines_ = true; 126 update_screen_->is_ignore_update_deadlines_ = true;
116 127
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 EXPECT_CALL(*mock_update_library_, status()) 224 EXPECT_CALL(*mock_update_library_, status())
214 .Times(AtLeast(1)) 225 .Times(AtLeast(1))
215 .WillRepeatedly(ReturnRef(status)); 226 .WillRepeatedly(ReturnRef(status));
216 EXPECT_CALL(*mock_screen_observer_, 227 EXPECT_CALL(*mock_screen_observer_,
217 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING)) 228 OnExit(ScreenObserver::UPDATE_ERROR_UPDATING))
218 .Times(1); 229 .Times(1);
219 update_screen_->UpdateStatusChanged(mock_update_library_); 230 update_screen_->UpdateStatusChanged(mock_update_library_);
220 } 231 }
221 232
222 } // namespace chromeos 233 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/update_screen_actor.h ('k') | chrome/browser/chromeos/login/update_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698