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

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

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Addressed comments (@nasko). Created 4 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_frame_navigation_observer.h" 5 #include "content/public/test/test_frame_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 if (has_committed_) 51 if (has_committed_)
52 return; 52 return;
53 53
54 wait_for_commit_ = true; 54 wait_for_commit_ = true;
55 message_loop_runner_->Run(); 55 message_loop_runner_->Run();
56 } 56 }
57 57
58 void TestFrameNavigationObserver::DidStartProvisionalLoadForFrame( 58 void TestFrameNavigationObserver::DidStartProvisionalLoadForFrame(
59 RenderFrameHost* render_frame_host, 59 RenderFrameHost* render_frame_host,
60 const GURL& validated_url, 60 const GURL& validated_url,
61 bool is_error_page, 61 bool is_error_page) {
62 bool is_iframe_srcdoc) {
63 RenderFrameHostImpl* rfh = 62 RenderFrameHostImpl* rfh =
64 static_cast<RenderFrameHostImpl*>(render_frame_host); 63 static_cast<RenderFrameHostImpl*>(render_frame_host);
65 if (rfh->frame_tree_node()->frame_tree_node_id() == frame_tree_node_id_) { 64 if (rfh->frame_tree_node()->frame_tree_node_id() == frame_tree_node_id_) {
66 navigation_started_ = true; 65 navigation_started_ = true;
67 has_committed_ = false; 66 has_committed_ = false;
68 } 67 }
69 } 68 }
70 69
71 void TestFrameNavigationObserver::DidCommitProvisionalLoadForFrame( 70 void TestFrameNavigationObserver::DidCommitProvisionalLoadForFrame(
72 RenderFrameHost* render_frame_host, 71 RenderFrameHost* render_frame_host,
(...skipping 14 matching lines...) Expand all
87 86
88 void TestFrameNavigationObserver::DidStopLoading() { 87 void TestFrameNavigationObserver::DidStopLoading() {
89 if (!navigation_started_) 88 if (!navigation_started_)
90 return; 89 return;
91 90
92 navigation_started_ = false; 91 navigation_started_ = false;
93 message_loop_runner_->Quit(); 92 message_loop_runner_->Quit();
94 } 93 }
95 94
96 } // namespace content 95 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698