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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 base::MessageLoop::current()->Run(); | 167 base::MessageLoop::current()->Run(); |
168 } | 168 } |
169 | 169 |
170 private: | 170 private: |
171 // Overridden from WebContentsObserver: | 171 // Overridden from WebContentsObserver: |
172 void DidStartNavigationToPendingEntry( | 172 void DidStartNavigationToPendingEntry( |
173 const GURL& validated_url, | 173 const GURL& validated_url, |
174 NavigationController::ReloadType reload_type) override { | 174 NavigationController::ReloadType reload_type) override { |
175 navigated_ = true; | 175 navigated_ = true; |
176 if (should_quit_loop_) | 176 if (should_quit_loop_) |
177 base::MessageLoop::current()->Quit(); | 177 base::MessageLoop::current()->QuitWhenIdle(); |
178 } | 178 } |
179 | 179 |
180 bool navigated_; | 180 bool navigated_; |
181 bool should_quit_loop_; | 181 bool should_quit_loop_; |
182 | 182 |
183 DISALLOW_COPY_AND_ASSIGN(NavigationWatcher); | 183 DISALLOW_COPY_AND_ASSIGN(NavigationWatcher); |
184 }; | 184 }; |
185 | 185 |
186 class InputEventMessageFilterWaitsForAcks : public BrowserMessageFilter { | 186 class InputEventMessageFilterWaitsForAcks : public BrowserMessageFilter { |
187 public: | 187 public: |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 details = dispatcher->OnEventFromSource(&release); | 1142 details = dispatcher->OnEventFromSource(&release); |
1143 ASSERT_FALSE(details.dispatcher_destroyed); | 1143 ASSERT_FALSE(details.dispatcher_destroyed); |
1144 WaitAFrame(); | 1144 WaitAFrame(); |
1145 | 1145 |
1146 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1146 EXPECT_LT(0, tracker.num_overscroll_updates()); |
1147 EXPECT_FALSE(tracker.overscroll_completed()); | 1147 EXPECT_FALSE(tracker.overscroll_completed()); |
1148 } | 1148 } |
1149 } | 1149 } |
1150 | 1150 |
1151 } // namespace content | 1151 } // namespace content |
OLD | NEW |