Chromium Code Reviews
DescriptionPPAPI: Refactor ppapi test callbacks to ease testing blocking callbacks.
There are really 3 changes to test_utils:
- Change "force_async_" to "callback_type_" so that we can represent REQUIRED, OPTIONAL, _and_ BLOCKING. (I left backwards compatibility with force_async_ and will follow up to change them all after this CL).
- Add a new form of WaitForResult and a new CHECK_CALLBACK_BEHAVIOR macro. This simplifies checking that the callback ran as expected (i.e., asynchronous or not). test_url_loader.cc in this CL is a good example of the new form. (My intent is to remove the existing WaitForResult in the aforementioned follow-up CL).
- Add TestCompletionCallback::GetCallback. This is a minor thing, but it means we can get rid of a bunch of ugly "static_cast<pp::CompletionCallback>" in the tests (see test_websocket.cc for an example of that).
BUG=92909
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=131215
Patch Set 1 : working locally... #
Total comments: 7
Patch Set 2 : review fixes #Patch Set 3 : sync #
Messages
Total messages: 9 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||