| Index: content/browser/loader/test_resource_handler.h
|
| diff --git a/content/browser/loader/test_resource_handler.h b/content/browser/loader/test_resource_handler.h
|
| index 08b172eb1e41d35cc99e562abe56ddf38a7feeb8..cadbbf06d672670d10d1df49f3ae43687c0ef35d 100644
|
| --- a/content/browser/loader/test_resource_handler.h
|
| +++ b/content/browser/loader/test_resource_handler.h
|
| @@ -146,6 +146,9 @@ class TestResourceHandler : public ResourceHandler {
|
| const std::string& body() const { return body_; }
|
| net::URLRequestStatus final_status() const { return final_status_; }
|
|
|
| + // Returns the current number of |this|'s methods on the callstack.
|
| + int call_depth() const { return call_depth_; }
|
| +
|
| // Spins the message loop until the request is deferred. Using this is
|
| // optional, but if used, must use it exclusively to wait for the request. If
|
| // the request was deferred and then resumed/canceled without calling this
|
| @@ -198,6 +201,9 @@ class TestResourceHandler : public ResourceHandler {
|
| net::URLRequestStatus::FromError(net::ERR_UNEXPECTED);
|
| bool canceled_ = false;
|
|
|
| + // Tracks recursive calls, which aren't allowed.
|
| + int call_depth_ = 0;
|
| +
|
| std::unique_ptr<base::RunLoop> deferred_run_loop_;
|
|
|
| base::RunLoop response_complete_run_loop_;
|
|
|