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

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

Issue 2779011: Make the reload button respond to middle-clicks like back/forward/home alread... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <string> 5 #include <string>
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } 253 }
254 254
255 // Test for crbug.com/22004. Reloading a page with a before unload handler and 255 // Test for crbug.com/22004. Reloading a page with a before unload handler and
256 // then canceling the dialog should not leave the throbber spinning. 256 // then canceling the dialog should not leave the throbber spinning.
257 IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) { 257 IN_PROC_BROWSER_TEST_F(BrowserTest, ReloadThenCancelBeforeUnload) {
258 GURL url("data:text/html," + BEFORE_UNLOAD_HTML); 258 GURL url("data:text/html," + BEFORE_UNLOAD_HTML);
259 ui_test_utils::NavigateToURL(browser(), url); 259 ui_test_utils::NavigateToURL(browser(), url);
260 260
261 // Navigate to another page, but click cancel in the dialog. Make sure that 261 // Navigate to another page, but click cancel in the dialog. Make sure that
262 // the throbber stops spinning. 262 // the throbber stops spinning.
263 browser()->Reload(); 263 browser()->Reload(CURRENT_TAB);
264 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); 264 AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
265 alert->CloseModalDialog(); 265 alert->CloseModalDialog();
266 EXPECT_FALSE(browser()->GetSelectedTabContents()->is_loading()); 266 EXPECT_FALSE(browser()->GetSelectedTabContents()->is_loading());
267 267
268 // Clear the beforeunload handler so the test can easily exit. 268 // Clear the beforeunload handler so the test can easily exit.
269 browser()->GetSelectedTabContents()->render_view_host()-> 269 browser()->GetSelectedTabContents()->render_view_host()->
270 ExecuteJavascriptInWebFrame(L"", L"onbeforeunload=null;"); 270 ExecuteJavascriptInWebFrame(L"", L"onbeforeunload=null;");
271 } 271 }
272 272
273 // Crashy on mac. http://crbug.com/40150 273 // Crashy on mac. http://crbug.com/40150
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // Open the app. Focus should move to the panel. 872 // Open the app. Focus should move to the panel.
873 Browser::OpenApplication(profile_, extension_app_->id()); 873 Browser::OpenApplication(profile_, extension_app_->id());
874 ASSERT_EQ(extra_browser, BrowserList::GetLastActive()); 874 ASSERT_EQ(extra_browser, BrowserList::GetLastActive());
875 ASSERT_EQ(2, extra_browser->tab_count()); 875 ASSERT_EQ(2, extra_browser->tab_count());
876 876
877 browser()->window()->Show(); 877 browser()->window()->Show();
878 Browser::OpenApplication(profile_, extension_app_->id()); 878 Browser::OpenApplication(profile_, extension_app_->id());
879 ASSERT_EQ(browser(), BrowserList::GetLastActive()); 879 ASSERT_EQ(browser(), BrowserList::GetLastActive());
880 ASSERT_EQ(2, browser()->tab_count()); 880 ASSERT_EQ(2, browser()->tab_count());
881 } 881 }
OLDNEW
« no previous file with comments | « chrome/browser/browser.cc ('k') | chrome/browser/browser_focus_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698