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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura_browsertest.cc

Issue 2225343002: Navigation: move RestoreType and ReloadType into a separate file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [rebase] Created 4 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 "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <tuple> 8 #include <tuple>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 void WaitUntilNavigationStarts() { 172 void WaitUntilNavigationStarts() {
173 if (navigated_) 173 if (navigated_)
174 return; 174 return;
175 should_quit_loop_ = true; 175 should_quit_loop_ = true;
176 base::RunLoop().Run(); 176 base::RunLoop().Run();
177 } 177 }
178 178
179 private: 179 private:
180 // Overridden from WebContentsObserver: 180 // Overridden from WebContentsObserver:
181 void DidStartNavigationToPendingEntry( 181 void DidStartNavigationToPendingEntry(const GURL& validated_url,
182 const GURL& validated_url, 182 ReloadType reload_type) override {
183 NavigationController::ReloadType reload_type) override {
184 navigated_ = true; 183 navigated_ = true;
185 if (should_quit_loop_) 184 if (should_quit_loop_)
186 base::MessageLoop::current()->QuitWhenIdle(); 185 base::MessageLoop::current()->QuitWhenIdle();
187 } 186 }
188 187
189 bool navigated_; 188 bool navigated_;
190 bool should_quit_loop_; 189 bool should_quit_loop_;
191 190
192 DISALLOW_COPY_AND_ASSIGN(NavigationWatcher); 191 DISALLOW_COPY_AND_ASSIGN(NavigationWatcher);
193 }; 192 };
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1127 details = dispatcher->OnEventFromSource(&release); 1126 details = dispatcher->OnEventFromSource(&release);
1128 ASSERT_FALSE(details.dispatcher_destroyed); 1127 ASSERT_FALSE(details.dispatcher_destroyed);
1129 WaitAFrame(); 1128 WaitAFrame();
1130 1129
1131 EXPECT_LT(0, tracker.num_overscroll_updates()); 1130 EXPECT_LT(0, tracker.num_overscroll_updates());
1132 EXPECT_FALSE(tracker.overscroll_completed()); 1131 EXPECT_FALSE(tracker.overscroll_completed());
1133 } 1132 }
1134 } 1133 }
1135 1134
1136 } // namespace content 1135 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698