• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
5 #ifndef PAPPI_TESTS_TEST_FLASH_MESSAGE_LOOP_H_
6 #define PAPPI_TESTS_TEST_FLASH_MESSAGE_LOOP_H_
7 
8 #include <string>
9 
10 #include "ppapi/c/pp_stdint.h"
11 #include "ppapi/tests/test_case.h"
12 #include "ppapi/utility/completion_callback_factory.h"
13 
14 namespace pp {
15 namespace flash {
16 class MessageLoop;
17 }
18 }
19 
20 class TestFlashMessageLoop : public TestCase {
21  public:
22   explicit TestFlashMessageLoop(TestingInstance* instance);
23   virtual ~TestFlashMessageLoop();
24 
25   // TestCase implementation.
26   virtual void RunTests(const std::string& filter);
27 
28  private:
29   std::string TestBasics();
30   std::string TestRunWithoutQuit();
31 
32   void QuitMessageLoopTask(int32_t unused);
33   void DestroyMessageLoopResourceTask(int32_t unused);
34 
35   pp::flash::MessageLoop* message_loop_;
36   pp::CompletionCallbackFactory<TestFlashMessageLoop> callback_factory_;
37 };
38 
39 #endif  // PAPPI_TESTS_TEST_FLASH_MESSAGE_LOOP_H_
40