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

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

Issue 2716493004: Renamed NavigationHandle::IsSamePage to NavigationHandle::IsSameDocument (Closed)
Patch Set: Rebased Created 3 years, 9 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 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 "content/browser/frame_host/navigation_entry_impl.h" 7 #include "content/browser/frame_host/navigation_entry_impl.h"
8 #include "content/browser/frame_host/render_frame_host_impl.h" 8 #include "content/browser/frame_host/render_frame_host_impl.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 if (has_committed_) 45 if (has_committed_)
46 return; 46 return;
47 47
48 wait_for_commit_ = true; 48 wait_for_commit_ = true;
49 run_loop_.Run(); 49 run_loop_.Run();
50 } 50 }
51 51
52 void TestFrameNavigationObserver::DidStartNavigation( 52 void TestFrameNavigationObserver::DidStartNavigation(
53 NavigationHandle* navigation_handle) { 53 NavigationHandle* navigation_handle) {
54 if (!navigation_handle->IsSamePage() && 54 if (!navigation_handle->IsSameDocument() &&
55 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) { 55 navigation_handle->GetFrameTreeNodeId() == frame_tree_node_id_) {
56 navigation_started_ = true; 56 navigation_started_ = true;
57 has_committed_ = false; 57 has_committed_ = false;
58 } 58 }
59 } 59 }
60 60
61 void TestFrameNavigationObserver::DidFinishNavigation( 61 void TestFrameNavigationObserver::DidFinishNavigation(
62 NavigationHandle* navigation_handle) { 62 NavigationHandle* navigation_handle) {
63 if (!navigation_started_) 63 if (!navigation_started_)
64 return; 64 return;
(...skipping 11 matching lines...) Expand all
76 76
77 void TestFrameNavigationObserver::DidStopLoading() { 77 void TestFrameNavigationObserver::DidStopLoading() {
78 if (!navigation_started_) 78 if (!navigation_started_)
79 return; 79 return;
80 80
81 navigation_started_ = false; 81 navigation_started_ = false;
82 run_loop_.Quit(); 82 run_loop_.Quit();
83 } 83 }
84 84
85 } // namespace content 85 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_observer.h ('k') | content/public/test/test_navigation_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698