| 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_, | 226 base::EndsWith(url.spec(), until_url_suffix_, true)) { |
| 227 base::CompareCase::SENSITIVE)) { | |
| 228 content::WebContentsObserver::Observe(NULL); | 227 content::WebContentsObserver::Observe(NULL); |
| 229 test_navigation_listener_->ResumeAll(); | 228 test_navigation_listener_->ResumeAll(); |
| 230 } | 229 } |
| 231 rvh_ = render_frame_host->GetRenderViewHost(); | 230 rvh_ = render_frame_host->GetRenderViewHost(); |
| 232 } | 231 } |
| 233 | 232 |
| 234 void set_has_user_gesture(bool has_user_gesture) { | 233 void set_has_user_gesture(bool has_user_gesture) { |
| 235 has_user_gesture_ = has_user_gesture; | 234 has_user_gesture_ = has_user_gesture; |
| 236 } | 235 } |
| 237 | 236 |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 "extensions/api_test/webnavigation/crash/b.html", | 758 "extensions/api_test/webnavigation/crash/b.html", |
| 760 embedded_test_server()->port())); | 759 embedded_test_server()->port())); |
| 761 ui_test_utils::NavigateToURL(browser(), url); | 760 ui_test_utils::NavigateToURL(browser(), url); |
| 762 | 761 |
| 763 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); | 762 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message(); |
| 764 } | 763 } |
| 765 | 764 |
| 766 #endif | 765 #endif |
| 767 | 766 |
| 768 } // namespace extensions | 767 } // namespace extensions |
| OLD | NEW |