Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Side by Side Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 1182183003: Move EndsWith to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } else { 215 } else {
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_ && EndsWith(url.spec(), until_url_suffix_, true)) { 225 if (script_was_executed_ &&
226 base::EndsWith(url.spec(), until_url_suffix_, true)) {
226 content::WebContentsObserver::Observe(NULL); 227 content::WebContentsObserver::Observe(NULL);
227 test_navigation_listener_->ResumeAll(); 228 test_navigation_listener_->ResumeAll();
228 } 229 }
229 rvh_ = render_frame_host->GetRenderViewHost(); 230 rvh_ = render_frame_host->GetRenderViewHost();
230 } 231 }
231 232
232 void set_has_user_gesture(bool has_user_gesture) { 233 void set_has_user_gesture(bool has_user_gesture) {
233 has_user_gesture_ = has_user_gesture; 234 has_user_gesture_ = has_user_gesture;
234 } 235 }
235 236
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/component_updater/cld_component_installer_unittest.cc ('k') | chrome/browser/extensions/default_apps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698