|
PPAPI: 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
Total comments: 7
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+420 lines, -295 lines) |
Patch |
 |
M |
ppapi/proxy/ppb_network_monitor_private_proxy.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_case.h
|
View
|
|
5 chunks |
+20 lines, -4 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_case.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_file_system.cc
|
View
|
1
|
1 chunk |
+21 lines, -42 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_flash_fullscreen.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_flash_fullscreen.cc
|
View
|
|
4 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_fullscreen.h
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_fullscreen.cc
|
View
|
|
4 chunks |
+9 lines, -10 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_network_monitor_private.cc
|
View
|
|
10 chunks |
+14 lines, -14 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_url_loader.cc
|
View
|
|
13 chunks |
+84 lines, -154 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_url_request.cc
|
View
|
|
2 chunks |
+15 lines, -19 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_utils.h
|
View
|
1
|
4 chunks |
+120 lines, -6 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_utils.cc
|
View
|
|
1 chunk |
+106 lines, -11 lines |
0 comments
|
Download
|
 |
M |
ppapi/tests/test_websocket.cc
|
View
|
|
13 chunks |
+17 lines, -21 lines |
0 comments
|
Download
|
Total messages: 9 (0 generated)
|