| 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/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 if (validated_url != delay_url_ || !rvh_) | 185 if (validated_url != delay_url_ || !rvh_) |
| 186 return; | 186 return; |
| 187 | 187 |
| 188 rvh_->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(script_)); | 188 rvh_->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(script_)); |
| 189 script_was_executed_ = true; | 189 script_was_executed_ = true; |
| 190 } | 190 } |
| 191 | 191 |
| 192 virtual void DidCommitProvisionalLoadForFrame( | 192 virtual void DidCommitProvisionalLoadForFrame( |
| 193 content::RenderFrameHost* render_frame_host, | 193 content::RenderFrameHost* render_frame_host, |
| 194 const GURL& url, | 194 const GURL& url, |
| 195 bool url_is_unreachable, |
| 195 ui::PageTransition transition_type) OVERRIDE { | 196 ui::PageTransition transition_type) OVERRIDE { |
| 196 if (script_was_executed_ && EndsWith(url.spec(), until_url_suffix_, true)) { | 197 if (script_was_executed_ && EndsWith(url.spec(), until_url_suffix_, true)) { |
| 197 content::WebContentsObserver::Observe(NULL); | 198 content::WebContentsObserver::Observe(NULL); |
| 198 test_navigation_listener_->ResumeAll(); | 199 test_navigation_listener_->ResumeAll(); |
| 199 } | 200 } |
| 200 rvh_ = render_frame_host->GetRenderViewHost(); | 201 rvh_ = render_frame_host->GetRenderViewHost(); |
| 201 } | 202 } |
| 202 | 203 |
| 203 private: | 204 private: |
| 204 content::NotificationRegistrar registrar_; | 205 content::NotificationRegistrar registrar_; |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 628 "extensions/api_test/webnavigation/crash/b.html", | 629 "extensions/api_test/webnavigation/crash/b.html", |
| 629 embedded_test_server()->port())); | 630 embedded_test_server()->port())); |
| 630 ui_test_utils::NavigateToURL(browser(), url); | 631 ui_test_utils::NavigateToURL(browser(), url); |
| 631 | 632 |
| 632 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 633 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 633 } | 634 } |
| 634 | 635 |
| 635 #endif | 636 #endif |
| 636 | 637 |
| 637 } // namespace extensions | 638 } // namespace extensions |
| OLD | NEW |