• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 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_CROS_CROS_IN_PROCESS_BROWSER_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_CROS_CROS_IN_PROCESS_BROWSER_TEST_H_
7 #pragma once
8 
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/cros/cros_mock.h"
11 #include "chrome/test/in_process_browser_test.h"
12 
13 namespace chromeos {
14 
15 // Base class for Chromium OS tests wanting to bring up a browser in the
16 // unit test process and mock some parts of CrosLibrary. Once you mock part of
17 // CrosLibrary it will be considered as successfully loaded and libraries
18 // that compose CrosLibrary will be created. Use CrosMock to specify minimum
19 // set of mocks for you test to succeed.
20 // See comments for InProcessBrowserTest base class too.
21 class CrosInProcessBrowserTest : public InProcessBrowserTest {
22  public:
23   CrosInProcessBrowserTest();
24   virtual ~CrosInProcessBrowserTest();
25 
26  protected:
27   scoped_ptr<CrosMock> cros_mock_;
28 
29   // Overriden for things you would normally override TearDown for.
30   virtual void TearDownInProcessBrowserTestFixture();
31 
32  private:
33   DISALLOW_COPY_AND_ASSIGN(CrosInProcessBrowserTest);
34 };
35 
36 }  // namespace chromeos
37 
38 #endif  // CHROME_BROWSER_CHROMEOS_CROS_CROS_IN_PROCESS_BROWSER_TEST_H_
39