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

Issue 9937001: PPAPI: Refactor ppapi test callbacks to ease testing blocking callbacks. (Closed)

Created:
8 years, 8 months ago by dmichael (off chromium)
Modified:
8 years, 8 months ago
Reviewers:
bbudge, brettw
CC:
chromium-reviews
Visibility:
Public.

Description

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

Patch Set 1 : working locally... #

Total comments: 7

Patch Set 2 : review fixes #

Patch Set 3 : sync #

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

Messages

Total messages: 9 (0 generated)
dmichael (off chromium)
bbudge: primary brettw: FYI http://codereview.chromium.org/9937001/diff/7013/ppapi/proxy/ppb_network_monitor_private_proxy.cc File ppapi/proxy/ppb_network_monitor_private_proxy.cc (right): http://codereview.chromium.org/9937001/diff/7013/ppapi/proxy/ppb_network_monitor_private_proxy.cc#newcode101 ppapi/proxy/ppb_network_monitor_private_proxy.cc:101: MessageLoop::current()->PostTask(FROM_HERE, RunWhileLocked(base::Bind( somewhat unrelated, but ...
8 years, 8 months ago (2012-04-02 21:15:02 UTC) #1
bbudge
This looks like it nicely simplifies a bunch of testing code. Just some questions and ...
8 years, 8 months ago (2012-04-04 19:03:00 UTC) #2
dmichael (off chromium)
http://codereview.chromium.org/9937001/diff/7013/ppapi/proxy/ppb_network_monitor_private_proxy.cc File ppapi/proxy/ppb_network_monitor_private_proxy.cc (right): http://codereview.chromium.org/9937001/diff/7013/ppapi/proxy/ppb_network_monitor_private_proxy.cc#newcode101 ppapi/proxy/ppb_network_monitor_private_proxy.cc:101: MessageLoop::current()->PostTask(FROM_HERE, RunWhileLocked(base::Bind( On 2012/04/04 19:03:00, bbudge1 wrote: > Does ...
8 years, 8 months ago (2012-04-04 19:50:47 UTC) #3
dmichael (off chromium)
ping?
8 years, 8 months ago (2012-04-06 18:37:24 UTC) #4
bbudge
still LGTM.
8 years, 8 months ago (2012-04-06 19:17:53 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/9937001/12002
8 years, 8 months ago (2012-04-06 19:23:26 UTC) #6
commit-bot: I haz the power
Try job failure for 9937001-12002 (retry) (retry) on mac_rel for step "browser_tests". It's a second ...
8 years, 8 months ago (2012-04-06 21:58:39 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dmichael@chromium.org/9937001/12002
8 years, 8 months ago (2012-04-06 22:10:20 UTC) #8
commit-bot: I haz the power
8 years, 8 months ago (2012-04-07 00:09:12 UTC) #9
Change committed as 131215

Powered by Google App Engine
This is Rietveld 408576698