| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 rvh_->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(script_)); | 216 rvh_->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(script_)); |
| 217 } | 217 } |
| 218 script_was_executed_ = true; | 218 script_was_executed_ = true; |
| 219 } | 219 } |
| 220 | 220 |
| 221 void DidCommitProvisionalLoadForFrame( | 221 void DidCommitProvisionalLoadForFrame( |
| 222 content::RenderFrameHost* render_frame_host, | 222 content::RenderFrameHost* render_frame_host, |
| 223 const GURL& url, | 223 const GURL& url, |
| 224 ui::PageTransition transition_type) override { | 224 ui::PageTransition transition_type) override { |
| 225 if (script_was_executed_ && | 225 if (script_was_executed_ && |
| 226 base::EndsWith(url.spec(), until_url_suffix_, true)) { | 226 base::EndsWith(url.spec(), until_url_suffix_, |
| 227 base::CompareCase::SENSITIVE)) { |
| 227 content::WebContentsObserver::Observe(NULL); | 228 content::WebContentsObserver::Observe(NULL); |
| 228 test_navigation_listener_->ResumeAll(); | 229 test_navigation_listener_->ResumeAll(); |
| 229 } | 230 } |
| 230 rvh_ = render_frame_host->GetRenderViewHost(); | 231 rvh_ = render_frame_host->GetRenderViewHost(); |
| 231 } | 232 } |
| 232 | 233 |
| 233 void set_has_user_gesture(bool has_user_gesture) { | 234 void set_has_user_gesture(bool has_user_gesture) { |
| 234 has_user_gesture_ = has_user_gesture; | 235 has_user_gesture_ = has_user_gesture; |
| 235 } | 236 } |
| 236 | 237 |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 "extensions/api_test/webnavigation/crash/b.html", | 759 "extensions/api_test/webnavigation/crash/b.html", |
| 759 embedded_test_server()->port())); | 760 embedded_test_server()->port())); |
| 760 ui_test_utils::NavigateToURL(browser(), url); | 761 ui_test_utils::NavigateToURL(browser(), url); |
| 761 | 762 |
| 762 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 763 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 763 } | 764 } |
| 764 | 765 |
| 765 #endif | 766 #endif |
| 766 | 767 |
| 767 } // namespace extensions | 768 } // namespace extensions |
| OLD | NEW |