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

Unified Diff: ppapi/tests/test_flash_message_loop.h

Issue 1559113002: Fix PPB_Flash_MessageLoop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TEST! Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/tests/test_flash_message_loop.h
diff --git a/ppapi/tests/test_flash_message_loop.h b/ppapi/tests/test_flash_message_loop.h
index b284eeddd3d5919851847ac1192fa1a1a695f493..241e6621e7d27c7213b40397ddd7cadb414a3997 100644
--- a/ppapi/tests/test_flash_message_loop.h
+++ b/ppapi/tests/test_flash_message_loop.h
@@ -20,19 +20,37 @@ class MessageLoop;
class TestFlashMessageLoop : public TestCase {
public:
explicit TestFlashMessageLoop(TestingInstance* instance);
- virtual ~TestFlashMessageLoop();
+ ~TestFlashMessageLoop() override;
// TestCase implementation.
- virtual void RunTests(const std::string& filter);
+ void RunTests(const std::string& filter) override;
+
+ void clear_instance_so() { instance_so_ = nullptr; }
+
+ void DidRunScriptCallback();
private:
+ // ScriptableObject implementation.
+ class InstanceSO;
+
+ // TestCase protected overrides.
+ pp::deprecated::ScriptableObject* CreateTestObject() override;
+
std::string TestBasics();
std::string TestRunWithoutQuit();
+ std::string TestSuspendScriptCallbackWhileRunning();
+ void TestSuspendScriptCallbackTask(int32_t unused);
void QuitMessageLoopTask(int32_t unused);
void DestroyMessageLoopResourceTask(int32_t unused);
pp::flash::MessageLoop* message_loop_;
+
+ // The scriptable object and result storage for the
+ // SuspendScriptCallbackWhileRunning test.
+ InstanceSO* instance_so_;
+ bool result_;
raymes 2016/02/08 00:46:26 nit: maybe be a bit more specific and name this: s
yzshen1 2016/02/08 16:14:10 I used it to report error for other failures such
+
pp::CompletionCallbackFactory<TestFlashMessageLoop> callback_factory_;
};

Powered by Google App Engine
This is Rietveld 408576698