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

Unified Diff: chrome/browser/ui/browser_navigator_browsertest.cc

Issue 10908153: [Panel refactor] Deprecate old panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_chromeos test failure Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/panels/base_panel_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_navigator_browsertest.cc
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 90ed70750dfda32dbb187eeecbecf2bc05b66dc2..04be5f7c8b6a67d9540ea5e2d99150c50584a14d 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -1245,60 +1245,4 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
EXPECT_EQ(2u, BrowserList::size());
}
-// This test makes sure any link in a crashed panel page navigates to a tabbed
-// window.
-class PanelBrowserNavigatorTest : public BrowserNavigatorTest {
- protected:
- virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- command_line->AppendSwitch(switches::kEnablePanels);
- }
-};
-
-IN_PROC_BROWSER_TEST_F(PanelBrowserNavigatorTest, NavigateFromCrashedPanel) {
- GURL url("http://maps.google.com/#a");
- GURL url2("http://maps.google.com/#b");
-
- // Create a panel.
- Browser* panel_browser = new Browser(
- Browser::CreateParams::CreateForApp(
- Browser::TYPE_PANEL, "Test", gfx::Rect(100, 100),
- browser()->profile()));
-
- // Navigate to the page.
- chrome::NavigateParams p(MakeNavigateParams(panel_browser));
- p.url = url;
- p.disposition = CURRENT_TAB;
- chrome::Navigate(&p);
-
- // Navigate() should have navigated in the existing panel window.
- EXPECT_EQ(panel_browser, p.browser);
-
- // We should now have two windows, the browser() provided by the framework and
- // the panel window we opened earlier. The tabbed browser window has 1 tab.
- EXPECT_EQ(2u, BrowserList::size());
- EXPECT_EQ(1, browser()->tab_count());
- EXPECT_EQ(1, panel_browser->tab_count());
-
- // Kill the panel page.
- WebContents* web_contents = chrome::GetActiveWebContents(panel_browser);
- web_contents->SetIsCrashed(base::TERMINATION_STATUS_PROCESS_CRASHED, -1);
- EXPECT_TRUE(web_contents->IsCrashed());
-
- // Navigate to the page.
- chrome::NavigateParams p2(MakeNavigateParams(panel_browser));
- p2.source_contents = chrome::GetActiveTabContents(panel_browser);
- p2.url = url2;
- p2.disposition = CURRENT_TAB;
- chrome::Navigate(&p2);
-
- // Navigate() should have opened a new tab in the existing tabbed window.
- EXPECT_EQ(browser(), p2.browser);
-
- // We should now have two windows, the browser() provided by the framework and
- // the panel window we opened earlier. The tabbed browser window has 2 tabs.
- EXPECT_EQ(2u, BrowserList::size());
- EXPECT_EQ(2, browser()->tab_count());
- EXPECT_EQ(1, panel_browser->tab_count());
-}
-
} // namespace
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/panels/base_panel_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698