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

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

Issue 2132673002: Adding Navigation Throttles to DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Got browser test to work with IsolateAllSitesForTesting Created 4 years, 5 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/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 void DidStartLoading() override { 42 void DidStartLoading() override {
43 parent_->OnDidStartLoading(web_contents()); 43 parent_->OnDidStartLoading(web_contents());
44 } 44 }
45 45
46 void DidStopLoading() override { 46 void DidStopLoading() override {
47 parent_->OnDidStopLoading(web_contents()); 47 parent_->OnDidStopLoading(web_contents());
48 } 48 }
49 49
50 void DidFailLoad(RenderFrameHost* render_frame_host,
51 const GURL& validated_url,
52 int error_code,
53 const base::string16& error_description,
54 bool was_ignored_by_handler) override {
55 fprintf(stderr, "YARR! %s\n", validated_url.spec().c_str());
nasko 2016/07/15 14:42:31 You plan to remove this before commit, right?
alex clarke (OOO till 29th) 2016/07/15 17:12:12 Done.
56 }
57
50 void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host, 58 void DidStartProvisionalLoadForFrame(RenderFrameHost* render_frame_host,
51 const GURL& validated_url, 59 const GURL& validated_url,
52 bool is_error_page, 60 bool is_error_page,
53 bool is_iframe_srcdoc) override { 61 bool is_iframe_srcdoc) override {
54 parent_->OnDidStartProvisionalLoad(render_frame_host, validated_url, 62 parent_->OnDidStartProvisionalLoad(render_frame_host, validated_url,
55 is_error_page, is_iframe_srcdoc); 63 is_error_page, is_iframe_srcdoc);
56 } 64 }
57 65
58 void DidFailProvisionalLoad( 66 void DidFailProvisionalLoad(
59 RenderFrameHost* render_frame_host, 67 RenderFrameHost* render_frame_host,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 200
193 void TestNavigationObserver::OnDidCommitProvisionalLoadForFrame( 201 void TestNavigationObserver::OnDidCommitProvisionalLoadForFrame(
194 RenderFrameHost* render_frame_host, 202 RenderFrameHost* render_frame_host,
195 const GURL& url, 203 const GURL& url,
196 ui::PageTransition transition_type) { 204 ui::PageTransition transition_type) {
197 last_navigation_url_ = url; 205 last_navigation_url_ = url;
198 last_navigation_succeeded_ = true; 206 last_navigation_succeeded_ = true;
199 } 207 }
200 208
201 } // namespace content 209 } // namespace content
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | content/test/data/devtools/control_navigations/iframe_navigation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698