| 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 #include "ppapi/tests/test_flash_message_loop.h" | 5 #include "ppapi/tests/test_flash_message_loop.h" |
| 6 | 6 |
| 7 #include "ppapi/c/pp_macros.h" | 7 #include "ppapi/c/pp_macros.h" |
| 8 #include "ppapi/cpp/core.h" | 8 #include "ppapi/cpp/core.h" |
| 9 #include "ppapi/cpp/logging.h" | 9 #include "ppapi/cpp/logging.h" |
| 10 #include "ppapi/cpp/module.h" | 10 #include "ppapi/cpp/module.h" |
| 11 #include "ppapi/cpp/private/flash_message_loop.h" | 11 #include "ppapi/cpp/private/flash_message_loop.h" |
| 12 #include "ppapi/tests/testing_instance.h" | 12 #include "ppapi/tests/testing_instance.h" |
| 13 | 13 |
| 14 REGISTER_TEST_CASE(FlashMessageLoop); | 14 REGISTER_TEST_CASE(FlashMessageLoop); |
| 15 | 15 |
| 16 TestFlashMessageLoop::TestFlashMessageLoop(TestingInstance* instance) | 16 TestFlashMessageLoop::TestFlashMessageLoop(TestingInstance* instance) |
| 17 : TestCase(instance), | 17 : TestCase(instance), |
| 18 message_loop_(NULL), | 18 message_loop_(NULL), |
| 19 PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { | 19 callback_factory_(this) { |
| 20 } | 20 } |
| 21 | 21 |
| 22 TestFlashMessageLoop::~TestFlashMessageLoop() { | 22 TestFlashMessageLoop::~TestFlashMessageLoop() { |
| 23 PP_DCHECK(!message_loop_); | 23 PP_DCHECK(!message_loop_); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void TestFlashMessageLoop::RunTests(const std::string& filter) { | 26 void TestFlashMessageLoop::RunTests(const std::string& filter) { |
| 27 RUN_TEST(Basics, filter); | 27 RUN_TEST(Basics, filter); |
| 28 RUN_TEST(RunWithoutQuit, filter); | 28 RUN_TEST(RunWithoutQuit, filter); |
| 29 } | 29 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 } | 70 } |
| 71 | 71 |
| 72 void TestFlashMessageLoop::DestroyMessageLoopResourceTask(int32_t unused) { | 72 void TestFlashMessageLoop::DestroyMessageLoopResourceTask(int32_t unused) { |
| 73 if (message_loop_) { | 73 if (message_loop_) { |
| 74 delete message_loop_; | 74 delete message_loop_; |
| 75 message_loop_ = NULL; | 75 message_loop_ = NULL; |
| 76 } else { | 76 } else { |
| 77 PP_NOTREACHED(); | 77 PP_NOTREACHED(); |
| 78 } | 78 } |
| 79 } | 79 } |
| OLD | NEW |