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 <list> | 5 #include <list> |
6 #include <set> | 6 #include <set> |
7 | 7 |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 ~StartProvisionalLoadObserver() override {} | 267 ~StartProvisionalLoadObserver() override {} |
268 | 268 |
269 void DidStartNavigation( | 269 void DidStartNavigation( |
270 content::NavigationHandle* navigation_handle) override { | 270 content::NavigationHandle* navigation_handle) override { |
271 if (navigation_handle->GetURL() == url_) { | 271 if (navigation_handle->GetURL() == url_) { |
272 url_seen_ = true; | 272 url_seen_ = true; |
273 message_loop_runner_->Quit(); | 273 message_loop_runner_->Quit(); |
274 } | 274 } |
275 } | 275 } |
276 | 276 |
277 // Run a nested message loop until navigation to the expected URL has started. | 277 // Run a nested run loop until navigation to the expected URL has started. |
278 void Wait() { | 278 void Wait() { |
279 if (url_seen_) | 279 if (url_seen_) |
280 return; | 280 return; |
281 | 281 |
282 message_loop_runner_->Run(); | 282 message_loop_runner_->Run(); |
283 } | 283 } |
284 | 284 |
285 private: | 285 private: |
286 GURL url_; | 286 GURL url_; |
287 bool url_seen_; | 287 bool url_seen_; |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 "extensions/api_test/webnavigation/crash/b.html", | 809 "extensions/api_test/webnavigation/crash/b.html", |
810 embedded_test_server()->port())); | 810 embedded_test_server()->port())); |
811 ui_test_utils::NavigateToURL(browser(), url); | 811 ui_test_utils::NavigateToURL(browser(), url); |
812 | 812 |
813 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 813 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
814 } | 814 } |
815 | 815 |
816 #endif | 816 #endif |
817 | 817 |
818 } // namespace extensions | 818 } // namespace extensions |
OLD | NEW |