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

Unified Diff: ppapi/tests/test_message_handler.cc

Issue 601923003: Revert of PPAPI: Never re-enter JavaScript for PostMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_message_handler.cc
diff --git a/ppapi/tests/test_message_handler.cc b/ppapi/tests/test_message_handler.cc
index dcfff7679ae25dbcbbe63d0ea913f146462627da..c5c8354fd9bd09ee90571d4b97bcf93b66f8aa5b 100644
--- a/ppapi/tests/test_message_handler.cc
+++ b/ppapi/tests/test_message_handler.cc
@@ -252,8 +252,13 @@
js_code += values_to_test[i];
js_code += " result: \" + result);\n";
}
+ // TODO(dmichael): Setting a property uses GetInstanceObject, which sends sync
+ // message, which can get interrupted with message to eval script, etc.
+ // FINISHED_WAITING message can therefore jump ahead. This test is
+ // currently carefully crafted to avoid races by doing all the JS in one call.
+ // That should be fixed before this API goes to stable. See crbug.com/384528
+ js_code += "plugin.postMessage('FINISHED_TEST');\n";
instance_->EvalScript(js_code);
- instance_->EvalScript("plugin.postMessage('FINISHED_TEST');\n");
handler.WaitForTestFinishedMessage();
handler.Unregister();
ASSERT_SUBTEST_SUCCESS(handler.WaitForDestroy());
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698