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

Unified Diff: tests/ppapi_test_example/ppapi_test_example.cc

Issue 7292002: Remove plugin connection to PPAPI scriptable objects (var deprecated). Also (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 5 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
« no previous file with comments | « tests/ppapi_proxy/user_main.nmf ('k') | tests/ppapi_test_example/ppapi_test_example.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ppapi_test_example/ppapi_test_example.cc
===================================================================
--- tests/ppapi_test_example/ppapi_test_example.cc (revision 6005)
+++ tests/ppapi_test_example/ppapi_test_example.cc (working copy)
@@ -19,53 +19,26 @@
printf("--- Callback\n");
}
-// Below are the before & after versions of sample test cases demonstrating
-// how to transition from synchronous scripting to postMessage as the test
-// driving mechanism.
-
-// Before.
-PP_Var TestSimpleSync() {
- printf("--- TestSimpleSync\n");
+void TestSimple() {
+ printf("--- TestSimple\n");
EXPECT(pp_instance() != kInvalidInstance);
EXPECT(pp_module() != kInvalidModule);
- return TEST_PASSED;
+ TEST_PASSED;
}
-// After.
-void TestSimpleAsync() {
- printf("--- TestSimpleAsync\n");
- EXPECT_ASYNC(pp_instance() != kInvalidInstance);
- EXPECT_ASYNC(pp_module() != kInvalidModule);
- TEST_PASSED_ASYNC;
-}
-
-// Before.
-PP_Var TestCallbackSync() {
- printf("--- TestCallbackSync\n");
+void TestCallback() {
+ printf("--- TestCallback\n");
PP_CompletionCallback callback = MakeTestableCompletionCallback(
- "CallbackSync", Callback, NULL /*user_data*/);
+ "Callback", Callback, NULL /*user_data*/);
PPBCore()->CallOnMainThread(10, callback, PP_OK);
- return TEST_PASSED;
+ TEST_PASSED;
}
-// After.
-void TestCallbackAsync() {
- printf("--- TestCallbackAsync\n");
- PP_CompletionCallback callback = MakeTestableCompletionCallback(
- "CallbackAsync", Callback, NULL /*user_data*/);
- PPBCore()->CallOnMainThread(10, callback, PP_OK);
- TEST_PASSED_ASYNC;
-}
-
} // namespace
void SetupTests() {
- // Before.
- RegisterScriptableTest("TestSimpleSync", TestSimpleSync);
- RegisterScriptableTest("TestCallbackSync", TestCallbackSync);
- // After.
- RegisterTest("TestSimpleAsync", TestSimpleAsync);
- RegisterTest("TestCallbackAsync", TestCallbackAsync);
+ RegisterTest("TestSimple", TestSimple);
+ RegisterTest("TestCallback", TestCallback);
}
void SetupPluginInterfaces() {
« no previous file with comments | « tests/ppapi_proxy/user_main.nmf ('k') | tests/ppapi_test_example/ppapi_test_example.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698