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

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

Issue 21123007: Reenable BrowserTest.WindowOpenClose (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 | « no previous file | ui/base/gtk/owned_widget_gtk.cc » ('j') | ui/base/gtk/owned_widget_gtk.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 // The normal browser should now have four. 1756 // The normal browser should now have four.
1757 EXPECT_EQ(4, browser()->tab_strip_model()->count()); 1757 EXPECT_EQ(4, browser()->tab_strip_model()->count());
1758 1758
1759 // Close the additional browsers. 1759 // Close the additional browsers.
1760 popup_browser->tab_strip_model()->CloseAllTabs(); 1760 popup_browser->tab_strip_model()->CloseAllTabs();
1761 app_browser->tab_strip_model()->CloseAllTabs(); 1761 app_browser->tab_strip_model()->CloseAllTabs();
1762 app_popup_browser->tab_strip_model()->CloseAllTabs(); 1762 app_popup_browser->tab_strip_model()->CloseAllTabs();
1763 } 1763 }
1764 #endif 1764 #endif
1765 1765
1766 // TODO(jochen): Rerwite test to not rely on popup blocker to hide popups. 1766 IN_PROC_BROWSER_TEST_F(BrowserTest, WindowOpenClose) {
1767 IN_PROC_BROWSER_TEST_F(BrowserTest, DISABLED_WindowOpenClose) { 1767 CommandLine::ForCurrentProcess()->AppendSwitch(
1768 switches::kDisablePopupBlocking);
1768 GURL url = ui_test_utils::GetTestUrl( 1769 GURL url = ui_test_utils::GetTestUrl(
1769 base::FilePath(), base::FilePath().AppendASCII("window.close.html")); 1770 base::FilePath(), base::FilePath().AppendASCII("window.close.html"));
1770 1771
1771 string16 title = ASCIIToUTF16("Title Of Awesomeness"); 1772 string16 title = ASCIIToUTF16("Title Of Awesomeness");
1772 content::TitleWatcher title_watcher( 1773 content::TitleWatcher title_watcher(
1773 browser()->tab_strip_model()->GetActiveWebContents(), title); 1774 browser()->tab_strip_model()->GetActiveWebContents(), title);
1774 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 2); 1775 ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(browser(), url, 2);
1775 EXPECT_EQ(title, title_watcher.WaitAndGetTitle()); 1776 EXPECT_EQ(title, title_watcher.WaitAndGetTitle());
1776 } 1777 }
1777 1778
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
2238 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2239 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2239 } 2240 }
2240 2241
2241 // Shift-middle-clicks open in a foreground tab. 2242 // Shift-middle-clicks open in a foreground tab.
2242 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { 2243 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) {
2243 int modifiers = WebKit::WebInputEvent::ShiftKey; 2244 int modifiers = WebKit::WebInputEvent::ShiftKey;
2244 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle; 2245 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle;
2245 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; 2246 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB;
2246 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2247 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2247 } 2248 }
OLDNEW
« no previous file with comments | « no previous file | ui/base/gtk/owned_widget_gtk.cc » ('j') | ui/base/gtk/owned_widget_gtk.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698