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

Side by Side Diff: chrome/browser/renderer_host/intercept_navigation_resource_throttle_unittest.cc

Issue 10640019: Remove the HANDLED_EXTERNALLY status code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase + fix nits Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/bind_helpers.h" 6 #include "base/bind_helpers.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "chrome/browser/renderer_host/intercept_navigation_resource_throttle.h" 9 #include "chrome/browser/renderer_host/intercept_navigation_resource_throttle.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 }; 61 };
62 62
63 MockResourceController() 63 MockResourceController()
64 : status_(UNKNOWN) { 64 : status_(UNKNOWN) {
65 } 65 }
66 66
67 Status status() const { return status_; } 67 Status status() const { return status_; }
68 68
69 // content::ResourceController 69 // content::ResourceController
70 virtual void Cancel() { 70 virtual void Cancel() {
71 DCHECK(status_ == UNKNOWN); 71 NOTREACHED();
72 }
73 virtual void CancelAndIgnore() {
72 status_ = CANCELLED; 74 status_ = CANCELLED;
73 ContinueTestCase(); 75 ContinueTestCase();
74 } 76 }
75 virtual void Resume() { 77 virtual void Resume() {
76 DCHECK(status_ == UNKNOWN); 78 DCHECK(status_ == UNKNOWN);
77 status_ = RESUMED; 79 status_ = RESUMED;
78 ContinueTestCase(); 80 ContinueTestCase();
79 } 81 }
80 82
81 private: 83 private:
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 RunThrottleWillStartRequestOnIOThread, 280 RunThrottleWillStartRequestOnIOThread,
279 base::Unretained(this), 281 base::Unretained(this),
280 GURL(kUnsafeTestUrl), 282 GURL(kUnsafeTestUrl),
281 web_contents()->GetRenderViewHost()->GetProcess()->GetID(), 283 web_contents()->GetRenderViewHost()->GetProcess()->GetID(),
282 web_contents()->GetRenderViewHost()->GetRoutingID(), 284 web_contents()->GetRenderViewHost()->GetRoutingID(),
283 base::Unretained(&defer))); 285 base::Unretained(&defer)));
284 286
285 // Wait for the request to finish processing. 287 // Wait for the request to finish processing.
286 message_loop_.Run(); 288 message_loop_.Run();
287 } 289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698