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

Side by Side Diff: chrome/test/out_of_proc_test_runner.h

Issue 7087014: Support automatic javascript test registry in gtest when creating WebUI tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adjusted comments and PathService replacement. Created 9 years, 6 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
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 CHROME_TEST_OUT_OF_PROC_TEST_RUNNER_H_
6 #define CHROME_TEST_OUT_OF_PROC_TEST_RUNNER_H_
7 #pragma once
8
9 #include "base/basictypes.h"
10
11 namespace test {
12
13 // Interface to register tests at runtime. The motivation for this is to provide
14 // a mechanism to register callbacks at linker initialization time to cause test
15 // registration at runtime.
16 class RegisterTestCallback {
17 public:
18 RegisterTestCallback();
19 virtual void RegisterTest() const = 0;
20
21 protected:
22 friend void CallRegisterTestCallbacksAndClear();
23 virtual ~RegisterTestCallback();
24
25 private:
26 DISALLOW_COPY_AND_ASSIGN(RegisterTestCallback);
27 };
28
29 // Every |callback| added with this function call will be called early enough in
30 // out_of_proc_test_runner's main to register tests at runtime. |callback| is
31 // owned by out_of_proc_test_runner, which will free it after calling it.
32 void AddRegisterTestCallback(RegisterTestCallback* callback);
33
34 } // namespace test
35
36 #endif // CHROME_TEST_OUT_OF_PROC_TEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698