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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_UPDATE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_UPDATE_SCREEN_H_ 7 8 #include "chrome/browser/chromeos/login/screens/screen_observer.h" 9 #include "chrome/browser/chromeos/login/screens/update_screen.h" 10 #include "chrome/browser/chromeos/login/screens/update_screen_actor.h" 11 #include "testing/gmock/include/gmock/gmock.h" 12 13 namespace chromeos { 14 15 class MockUpdateScreen : public UpdateScreen { 16 public: 17 MockUpdateScreen(ScreenObserver* screen_observer, UpdateScreenActor* actor); 18 virtual ~MockUpdateScreen(); 19 20 MOCK_METHOD0(StartNetworkCheck, void()); 21 }; 22 23 class MockUpdateScreenActor : public UpdateScreenActor { 24 public: 25 MockUpdateScreenActor(); 26 virtual ~MockUpdateScreenActor(); 27 28 virtual void SetDelegate(UpdateScreenActor::Delegate* screen) OVERRIDE; 29 30 MOCK_METHOD1(MockSetDelegate, void(UpdateScreenActor::Delegate* screen)); 31 MOCK_METHOD0(Show, void()); 32 MOCK_METHOD0(Hide, void()); 33 MOCK_METHOD0(PrepareToShow, void()); 34 MOCK_METHOD0(ShowManualRebootInfo, void()); 35 MOCK_METHOD1(SetProgress, void(int progress)); 36 MOCK_METHOD1(ShowEstimatedTimeLeft, void(bool enable)); 37 MOCK_METHOD1(SetEstimatedTimeLeft, void(const base::TimeDelta& time)); 38 MOCK_METHOD1(ShowProgressMessage, void(bool enable)); 39 MOCK_METHOD1(SetProgressMessage, void(ProgressMessage message)); 40 MOCK_METHOD1(ShowCurtain, void(bool enable)); 41 MOCK_METHOD1(ShowPreparingUpdatesInfo, void(bool enable)); 42 43 private: 44 UpdateScreenActor::Delegate* screen_; 45 }; 46 47 } // namespace chromeos 48 49 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_UPDATE_SCREEN_H_ 50