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 "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 Loading... |
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 Loading... |
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 } |
OLD | NEW |