Add ThrottlingResourceHandler unittests |
|||
Issue descriptionWe should have some ThrottlingResourceHandler unittests (There currently aren't any). In particular, check the following: Sync/async resume/cancel at each phase. Out of band deletion from a ResourceThrottle between each phase. Maybe out of band cancellation from one throttle when waiting on another? Don't think we need to test more general out--of-band cancellation, since that will be handled by the ResourceLoader in the new world, via sync destruction.
,
Dec 8 2016
It would be great if a test harness for these tests could be used for ResourceThrottle unit tests as well.
,
Dec 8 2016
I am thinking I'll make a harness for ResourceLoaders in general (Mainly so we can just update the harness to work with the new API, and all the tests will still work, possibly with just string/method name substitutions). It probably wouldn't get us much over just using the old ResourceHandler API directly, though.
,
Dec 8 2016
ResourceHandlers, rather.
,
Jan 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91 commit b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91 Author: mmenke <mmenke@chromium.org> Date: Wed Jan 11 23:10:18 2017 Add some tests for ThrottlingResourceHandler. Also introduce a new wrapper class for testing ResourceHandlers, which will be useful to help make an upcoming API chance a bit simpler. Also add support for on ResourceThrottle calling Resume() after another does an out-of-band-cancel. We have nothing to prevent that case, but a DCHECK could be triggered in the (unlikely) case it happened. BUG= 672581 Review-Url: https://codereview.chromium.org/2563163002 Cr-Commit-Position: refs/heads/master@{#443043} [add] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/browser/loader/mock_resource_loader.cc [add] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/browser/loader/mock_resource_loader.h [modify] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/browser/loader/throttling_resource_handler.cc [modify] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/browser/loader/throttling_resource_handler.h [add] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/browser/loader/throttling_resource_handler_unittest.cc [modify] https://crrev.com/b4836c494c0ce6a8c5cf285736efc7cf1ae5fc91/content/test/BUILD.gn
,
Jan 12 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mmenke@chromium.org
, Dec 8 2016Components: Internals>Network