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

Side by Side Diff: chrome/browser/chromeos/login/oobe_base_test.h

Issue 99863007: Added CrOS-specific OAuth2 browser test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
(Empty)
1 // Copyright 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/command_line.h"
12 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
13 #include "chrome/browser/chromeos/login/mock_user_manager.h"
14 #include "chrome/browser/chromeos/login/webui_login_display.h"
15 #include "chrome/test/base/in_process_browser_test.h"
16 #include "content/public/test/test_utils.h"
17 #include "google_apis/gaia/fake_gaia.h"
18 #include "net/test/embedded_test_server/embedded_test_server.h"
19
20 namespace content {
21 class WebUI;
22 } // namespace content
23
24 namespace chromeos {
25
26 class FakeUserManager;
27 class NetworkPortalDetectorTestImpl;
28 class SigninScreenHandler;
29
30 // Base class for OOBE and Kiosk tests.
31 class OobeBaseTest : public InProcessBrowserTest {
32 public:
33 OobeBaseTest();
34 virtual ~OobeBaseTest();
35
36 protected:
37 // InProcessBrowserTest overrides.
38 virtual void SetUp() OVERRIDE;
39 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
40 virtual void SetUpOnMainThread() OVERRIDE;
41 virtual void CleanUpOnMainThread() OVERRIDE;
42 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
43
44 // Network status control functions.
45 void SimulateNetworkOffline();
46 void SimulateNetworkOnline();
47 void SimulateNetworkPortal();
48
49 base::Closure SimulateNetworkOfflineClosure();
50 base::Closure SimulateNetworkOnlineClosure();
51 base::Closure SimulateNetworkPortalClosure();
52
53 // Checks JavaScript |expression| in login screen.
54 void JsExpect(const std::string& expression);
55
56 // Returns chrome://oobe WebUI.
57 content::WebUI* GetLoginUI();
58
59 // Returns SigninScreenHandler for login screen.
60 SigninScreenHandler* GetSigninScreenHandler();
61
62 // Returns login display.
63 WebUILoginDisplay* GetLoginDisplay();
64
65 FakeGaia fake_gaia_;
66 scoped_ptr<MockUserManager> mock_user_manager_;
67 NetworkPortalDetectorTestImpl* network_portal_detector_;
68 };
69
70 } // namespace chromeos
71
72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698