DescriptionFix StackOverFlow in AdvancedMockContext.
The AdvancedMockContext previously did not override registerComponentCallbacks
and unregisterComponentCallbacks. The implementation of these methods in
Context calls getApplicationContext before delegating the call to it, and since
AdvancedMockContext returns |this| in getApplicationContext, this leads to a
loop.
This CL adds overrides for these two methods that make the calls to the base
context instead, which will typically either be a MockContext or the target
context being instrumented.
BUG=394464
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284023
Patch Set 1 #
Total comments: 2
Patch Set 2 : Added test. #
Messages
Total messages: 7 (0 generated)
|