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

Side by Side Diff: chrome/browser/referrer_policy_browsertest.cc

Issue 10823029: Move WaitForLoadStop from ui_test_utils to browser_test_utils so that it can be reused in content_b… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/string_number_conversions.h" 6 #include "base/string_number_conversions.h"
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/tab_contents/render_view_context_menu.h" 9 #include "chrome/browser/tab_contents/render_view_context_menu.h"
10 #include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util. h" 10 #include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util. h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 mouse_event.clickCount = 1; 157 mouse_event.clickCount = 1;
158 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 158 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
159 mouse_event.type = WebKit::WebInputEvent::MouseUp; 159 mouse_event.type = WebKit::WebInputEvent::MouseUp;
160 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); 160 tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
161 } 161 }
162 162
163 if (opens_new_tab) { 163 if (opens_new_tab) {
164 tab_added_observer.Wait(); 164 tab_added_observer.Wait();
165 tab = tab_added_observer.GetTab(); 165 tab = tab_added_observer.GetTab();
166 EXPECT_TRUE(tab); 166 EXPECT_TRUE(tab);
167 ui_test_utils::WaitForLoadStop(tab); 167 content::WaitForLoadStop(tab);
168 EXPECT_EQ(expected_title, tab->GetTitle()); 168 EXPECT_EQ(expected_title, tab->GetTitle());
169 } else { 169 } else {
170 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle()); 170 EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
171 } 171 }
172 172
173 return start_url; 173 return start_url;
174 } 174 }
175 175
176 scoped_ptr<net::TestServer> test_server_; 176 scoped_ptr<net::TestServer> test_server_;
177 scoped_ptr<net::TestServer> ssl_test_server_; 177 scoped_ptr<net::TestServer> ssl_test_server_;
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 chrome::Reload(browser(), CURRENT_TAB); 398 chrome::Reload(browser(), CURRENT_TAB);
399 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); 399 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle());
400 400
401 title_watcher.reset(new content::TitleWatcher(tab, expected_title)); 401 title_watcher.reset(new content::TitleWatcher(tab, expected_title));
402 AddAllPossibleTitles(start_url, title_watcher.get()); 402 AddAllPossibleTitles(start_url, title_watcher.get());
403 403
404 // Shift-reload to B. 404 // Shift-reload to B.
405 chrome::ReloadIgnoringCache(browser(), CURRENT_TAB); 405 chrome::ReloadIgnoringCache(browser(), CURRENT_TAB);
406 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle()); 406 EXPECT_EQ(expected_title, title_watcher->WaitAndGetTitle());
407 } 407 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/web_request/web_request_apitest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698