OLD | NEW |
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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 navigated_(false), | 166 navigated_(false), |
167 should_quit_loop_(false) { | 167 should_quit_loop_(false) { |
168 } | 168 } |
169 | 169 |
170 ~NavigationWatcher() override {} | 170 ~NavigationWatcher() override {} |
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::MessageLoop::current()->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( |
182 const GURL& validated_url, | 182 const GURL& validated_url, |
183 NavigationController::ReloadType reload_type) override { | 183 NavigationController::ReloadType reload_type) override { |
184 navigated_ = true; | 184 navigated_ = true; |
185 if (should_quit_loop_) | 185 if (should_quit_loop_) |
186 base::MessageLoop::current()->QuitWhenIdle(); | 186 base::MessageLoop::current()->QuitWhenIdle(); |
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 details = dispatcher->OnEventFromSource(&release); | 1127 details = dispatcher->OnEventFromSource(&release); |
1128 ASSERT_FALSE(details.dispatcher_destroyed); | 1128 ASSERT_FALSE(details.dispatcher_destroyed); |
1129 WaitAFrame(); | 1129 WaitAFrame(); |
1130 | 1130 |
1131 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1131 EXPECT_LT(0, tracker.num_overscroll_updates()); |
1132 EXPECT_FALSE(tracker.overscroll_completed()); | 1132 EXPECT_FALSE(tracker.overscroll_completed()); |
1133 } | 1133 } |
1134 } | 1134 } |
1135 | 1135 |
1136 } // namespace content | 1136 } // namespace content |
OLD | NEW |