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

Side by Side Diff: native_client_sdk/src/libraries/c_salt/test/gtest_instance.h

Issue 10854137: [NaCl SDK] gtest_ppapi library. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove hacks Created 8 years, 4 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) 2012 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 #ifndef C_SALT_TEST_GTEST_INSTANCE_H_
5 #define C_SALT_TEST_GTEST_INSTANCE_H_
6
7 #include "ppapi/cpp/instance.h"
8
9 namespace c_salt {
10
11 // GTestInstance is a NaCl instance specifically dedicated to running
12 // gtest-based unit tests. It creates a GTestRunner thread/singleton pair as
13 // part of its Init function and runs all registered gtests once it
14 // receives a 'RunGTest' message in its post-message handler. Results from the
15 // test are posted back to JS through GTestEventListener.
16 //
17 // All tests are run from a background thread and must be written accordingly.
18 // Although that may complicate the test code a little, it allows the tests
19 // to be synchronized. I.e. Each test is launched and the thread is blocked
20 // until the outcome is known and reported.
21 class GTestInstance : public pp::Instance {
22 public:
23 explicit GTestInstance(PP_Instance instance);
24 virtual ~GTestInstance();
25
26 // pp::Instance overrides.
27 virtual bool Init(uint32_t argc, const char* argn[], const char* argv[]);
28 virtual void HandleMessage(const pp::Var& var_message);
29 };
30
31 } // namespace c_salt
32
33 #endif // C_SALT_TEST_GTEST_INSTANCE_H_
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698