Home | History | Annotate | Download | only in login
      1 // Copyright (c) 2010 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_WIZARD_IN_PROCESS_BROWSER_TEST_H_
      6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_IN_PROCESS_BROWSER_TEST_H_
      7 #pragma once
      8 
      9 #include <string>
     10 
     11 #include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
     12 
     13 class Browser;
     14 class Profile;
     15 class WizardController;
     16 
     17 namespace chromeos {
     18 
     19 class LoginDisplayHost;
     20 
     21 // Base class for test related to login wizard and its screens.
     22 // Instead of creating Chrome browser window it creates login wizard window
     23 // with specified parameters and allows to customize environment at the
     24 // right moment in time before wizard is created.
     25 class WizardInProcessBrowserTest : public CrosInProcessBrowserTest {
     26  public:
     27   explicit WizardInProcessBrowserTest(const char* screen_name);
     28 
     29  protected:
     30   // Can be overriden by derived test fixtures to set up environment after
     31   // browser is created but wizard is not shown yet.
     32   virtual void SetUpWizard() {}
     33 
     34   // Overriden from InProcessBrowserTest:
     35   virtual Browser* CreateBrowser(Profile* profile);
     36   virtual void CleanUpOnMainThread();
     37 
     38   WizardController* controller() const { return controller_; }
     39   void set_controller(WizardController* controller) {
     40     controller_ = controller;
     41   }
     42 
     43  private:
     44   std::string screen_name_;
     45   WizardController* controller_;
     46   LoginDisplayHost* host_;
     47 
     48   DISALLOW_COPY_AND_ASSIGN(WizardInProcessBrowserTest);
     49 };
     50 
     51 }  // namespace chromeos
     52 
     53 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_IN_PROCESS_BROWSER_TEST_H_
     54 
     55