OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ | 5 #ifndef PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ |
6 #define PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ | 6 #define PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/pp_stdint.h" | 10 #include "ppapi/c/pp_stdint.h" |
11 #include "ppapi/tests/test_case.h" | 11 #include "ppapi/tests/test_case.h" |
12 #include "ppapi/utility/completion_callback_factory.h" | 12 #include "ppapi/utility/completion_callback_factory.h" |
13 | 13 |
14 namespace pp { | |
15 class MessageLoop; | |
16 } | |
17 | |
18 class TestMessageLoop : public TestCase { | 14 class TestMessageLoop : public TestCase { |
19 public: | 15 public: |
20 explicit TestMessageLoop(TestingInstance* instance); | 16 explicit TestMessageLoop(TestingInstance* instance); |
21 virtual ~TestMessageLoop(); | 17 virtual ~TestMessageLoop(); |
22 | 18 |
23 private: | 19 private: |
24 // TestCase implementation. | 20 // TestCase implementation. |
25 virtual void RunTests(const std::string& filter); | 21 virtual void RunTests(const std::string& filter); |
26 | 22 |
27 std::string TestBasics(); | 23 std::string TestBasics(); |
(...skipping 10 matching lines...) Expand all Loading... |
38 void EchoParamToMainTask(int32_t result, TestParam param); | 34 void EchoParamToMainTask(int32_t result, TestParam param); |
39 | 35 |
40 // The last test param we received in SetParamAndQuitTask (or kInvalid if | 36 // The last test param we received in SetParamAndQuitTask (or kInvalid if |
41 // none). | 37 // none). |
42 TestParam param_; | 38 TestParam param_; |
43 pp::CompletionCallbackFactory<TestMessageLoop> callback_factory_; | 39 pp::CompletionCallbackFactory<TestMessageLoop> callback_factory_; |
44 NestedEvent main_loop_task_ran_; | 40 NestedEvent main_loop_task_ran_; |
45 }; | 41 }; |
46 | 42 |
47 #endif // PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ | 43 #endif // PAPPI_TESTS_TEST_MESSAGE_LOOP_H_ |
OLD | NEW |