Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / login / screens / mock_error_screen.h
blobbea1ce3d71b5a5b1cf85b8a7193674d0ed0d0e85
1 // Copyright (c) 2013 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_ERROR_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_ERROR_SCREEN_H_
8 #include "chrome/browser/chromeos/login/screens/error_screen.h"
9 #include "chrome/browser/chromeos/login/screens/network_error.h"
10 #include "chrome/browser/chromeos/login/screens/network_error_model.h"
11 #include "chrome/browser/chromeos/login/screens/network_error_view.h"
12 #include "testing/gmock/include/gmock/gmock.h"
14 namespace chromeos {
16 class MockErrorScreen : public ErrorScreen {
17 public:
18 MockErrorScreen(BaseScreenDelegate* base_screen_delegate,
19 NetworkErrorView* view);
20 ~MockErrorScreen() override;
22 void FixCaptivePortal() override;
23 void SetUIState(NetworkError::UIState ui_state) override;
24 void SetErrorState(NetworkError::ErrorState error_state,
25 const std::string& network) override;
27 MOCK_METHOD0(MockFixCaptivePortal, void());
28 MOCK_METHOD1(MockSetUIState, void(NetworkError::UIState ui_state));
29 MOCK_METHOD2(MockSetErrorState,
30 void(NetworkError::ErrorState error_state,
31 const std::string& network));
34 class MockNetworkErrorView : public NetworkErrorView {
35 public:
36 MockNetworkErrorView();
37 virtual ~MockNetworkErrorView();
39 void Bind(NetworkErrorModel& model) override;
40 void Unbind() override;
42 MOCK_METHOD0(PrepareToShow, void());
43 MOCK_METHOD0(Show, void());
44 MOCK_METHOD0(Hide, void());
45 MOCK_METHOD1(MockBind, void(NetworkErrorModel& model));
46 MOCK_METHOD0(MockUnbind, void());
47 MOCK_METHOD1(ShowScreen, void(OobeUI::Screen screen));
49 private:
50 NetworkErrorModel* model_;
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_MOCK_ERROR_SCREEN_H_