Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / oobe_base_test.h
blobf40fe4d76bcad4ec526f5ca37287a8c60f4a758d
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_
8 #include <string>
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/webui_login_display.h"
14 #include "chrome/browser/extensions/extension_apitest.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"
20 namespace content {
21 class WebUI;
22 } // namespace content
24 namespace chromeos {
26 class FakeUserManager;
27 class NetworkPortalDetectorTestImpl;
28 class SigninScreenHandler;
30 // Base class for OOBE and Kiosk tests.
31 class OobeBaseTest : public ExtensionApiTest {
32 public:
33 OobeBaseTest();
34 virtual ~OobeBaseTest();
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;
44 // Network status control functions.
45 void SimulateNetworkOffline();
46 void SimulateNetworkOnline();
47 void SimulateNetworkPortal();
49 base::Closure SimulateNetworkOfflineClosure();
50 base::Closure SimulateNetworkOnlineClosure();
51 base::Closure SimulateNetworkPortalClosure();
53 // Checks JavaScript |expression| in login screen.
54 void JsExpect(const std::string& expression);
56 // Returns chrome://oobe WebUI.
57 content::WebUI* GetLoginUI();
59 // Returns SigninScreenHandler for login screen.
60 SigninScreenHandler* GetSigninScreenHandler();
62 // Returns login display.
63 WebUILoginDisplay* GetLoginDisplay();
65 scoped_ptr<FakeGaia> fake_gaia_;
66 NetworkPortalDetectorTestImpl* network_portal_detector_;
69 } // namespace chromeos
71 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_OOBE_BASE_TEST_H_