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

Side by Side Diff: content/public/test/test_navigation_observer.cc

Issue 1194383003: Add a flag showing whether the current request was ignored by a handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failures (DidFailProvisionalLoad calls in unit tests) Created 5 years, 6 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 "content/public/test/test_navigation_observer.h" 5 #include "content/public/test/test_navigation_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 bool is_error_page, 51 bool is_error_page,
52 bool is_iframe_srcdoc) override { 52 bool is_iframe_srcdoc) override {
53 parent_->OnDidStartProvisionalLoadForFrame( 53 parent_->OnDidStartProvisionalLoadForFrame(
54 render_frame_host, validated_url, is_error_page, is_iframe_srcdoc); 54 render_frame_host, validated_url, is_error_page, is_iframe_srcdoc);
55 } 55 }
56 56
57 void DidFailProvisionalLoad( 57 void DidFailProvisionalLoad(
58 RenderFrameHost* render_frame_host, 58 RenderFrameHost* render_frame_host,
59 const GURL& validated_url, 59 const GURL& validated_url,
60 int error_code, 60 int error_code,
61 const base::string16& error_description) override { 61 const base::string16& error_description,
62 bool was_ignored_by_handler) override {
62 parent_->OnDidFailProvisionalLoad(render_frame_host, validated_url, 63 parent_->OnDidFailProvisionalLoad(render_frame_host, validated_url,
63 error_code, error_description); 64 error_code, error_description);
64 } 65 }
65 66
66 void DidCommitProvisionalLoadForFrame( 67 void DidCommitProvisionalLoadForFrame(
67 RenderFrameHost* render_frame_host, 68 RenderFrameHost* render_frame_host,
68 const GURL& url, 69 const GURL& url,
69 ui::PageTransition transition_type) override { 70 ui::PageTransition transition_type) override {
70 parent_->OnDidCommitProvisionalLoadForFrame( 71 parent_->OnDidCommitProvisionalLoadForFrame(
71 render_frame_host, url, transition_type); 72 render_frame_host, url, transition_type);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 191
191 void TestNavigationObserver::OnDidCommitProvisionalLoadForFrame( 192 void TestNavigationObserver::OnDidCommitProvisionalLoadForFrame(
192 RenderFrameHost* render_frame_host, 193 RenderFrameHost* render_frame_host,
193 const GURL& url, 194 const GURL& url,
194 ui::PageTransition transition_type) { 195 ui::PageTransition transition_type) {
195 last_navigation_url_ = url; 196 last_navigation_url_ = url;
196 last_navigation_succeeded_ = true; 197 last_navigation_succeeded_ = true;
197 } 198 }
198 199
199 } // namespace content 200 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698