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

Side by Side Diff: content/test/browser_test_base.h

Issue 8036044: Add (not yet working) content_browsertests target. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 months 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
« no previous file with comments | « content/test/browser_test.h ('k') | content/test/browser_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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 CONTENT_TEST_BROWSER_TEST_BASE_H_
6 #define CONTENT_TEST_BROWSER_TEST_BASE_H_
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 class BrowserTestBase : public testing::Test {
13 public:
14 BrowserTestBase();
15 virtual ~BrowserTestBase();
16
17 // We do this so we can be used in a Task.
18 void AddRef() {}
19 void Release() {}
20 static bool ImplementsThreadSafeReferenceCounting() { return false; }
21
22 // Configures everything for an in process browser test, then invokes
23 // BrowserMain. BrowserMain ends up invoking RunTestOnMainThreadLoop.
24 virtual void SetUp() OVERRIDE;
25
26 // Restores state configured in SetUp.
27 virtual void TearDown() OVERRIDE;
28
29 protected:
30 // We need these special methods because SetUp is the bottom of the stack
31 // that winds up calling your test method, so it is not always an option
32 // to do what you want by overriding it and calling the superclass version.
33 //
34 // Override this for things you would normally override SetUp for. It will be
35 // called before your individual test fixture method is run, but after most
36 // of the overhead initialization has occured.
37 virtual void SetUpInProcessBrowserTestFixture() {}
38
39 // Override this for things you would normally override TearDown for.
40 virtual void TearDownInProcessBrowserTestFixture() {}
41
42 // Override this rather than TestBody.
43 virtual void RunTestOnMainThread() = 0;
44
45 // This is invoked from main after browser_init/browser_main have completed.
46 // This prepares for the test by creating a new browser, runs the test
47 // (RunTestOnMainThread), quits the browsers and returns.
48 virtual void RunTestOnMainThreadLoop() = 0;
49
50 private:
51 void ProxyRunTestOnMainThreadLoop();
52 };
53
54 #endif // CONTENT_TEST_BROWSER_TEST_BASE_H_
OLDNEW
« no previous file with comments | « content/test/browser_test.h ('k') | content/test/browser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698