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

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

Issue 2685333005: ash: fix regression where ctrl+n put new window on wrong desktop (Closed)
Patch Set: Rebase to ToT Created 3 years, 10 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
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 "chrome/browser/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // We should have one window, with one tab. 114 // We should have one window, with one tab.
115 EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); 115 EXPECT_EQ(1u, chrome::GetTotalBrowserCount());
116 EXPECT_EQ(2, browser()->tab_strip_model()->count()); 116 EXPECT_EQ(2, browser()->tab_strip_model()->count());
117 117
118 *title = param.target_contents->GetTitle(); 118 *title = param.target_contents->GetTitle();
119 return true; 119 return true;
120 } 120 }
121 121
122 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type, 122 Browser* BrowserNavigatorTest::CreateEmptyBrowserForType(Browser::Type type,
123 Profile* profile) { 123 Profile* profile) {
124 Browser* browser = new Browser(Browser::CreateParams(type, profile)); 124 Browser* browser = new Browser(Browser::CreateParams(type, profile, true));
125 chrome::AddTabAt(browser, GURL(), -1, true); 125 chrome::AddTabAt(browser, GURL(), -1, true);
126 return browser; 126 return browser;
127 } 127 }
128 128
129 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Profile* profile) { 129 Browser* BrowserNavigatorTest::CreateEmptyBrowserForApp(Profile* profile) {
130 Browser* browser = new Browser(Browser::CreateParams::CreateForApp( 130 Browser* browser = new Browser(Browser::CreateParams::CreateForApp(
131 "Test", false /* trusted_source */, gfx::Rect(), profile)); 131 "Test", false /* trusted_source */, gfx::Rect(), profile, true));
132 chrome::AddTabAt(browser, GURL(), -1, true); 132 chrome::AddTabAt(browser, GURL(), -1, true);
133 return browser; 133 return browser;
134 } 134 }
135 135
136 WebContents* BrowserNavigatorTest::CreateWebContents(bool initialize_renderer) { 136 WebContents* BrowserNavigatorTest::CreateWebContents(bool initialize_renderer) {
137 content::WebContents::CreateParams create_params(browser()->profile()); 137 content::WebContents::CreateParams create_params(browser()->profile());
138 create_params.initialize_renderer = initialize_renderer; 138 create_params.initialize_renderer = initialize_renderer;
139 content::WebContents* base_web_contents = 139 content::WebContents* base_web_contents =
140 browser()->tab_strip_model()->GetActiveWebContents(); 140 browser()->tab_strip_model()->GetActiveWebContents();
141 if (base_web_contents) { 141 if (base_web_contents) {
(...skipping 1357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 content::TestNavigationObserver back_load_observer(popup); 1499 content::TestNavigationObserver back_load_observer(popup);
1500 controller->GoBack(); 1500 controller->GoBack();
1501 back_load_observer.Wait(); 1501 back_load_observer.Wait();
1502 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost()); 1502 EXPECT_EQ(webui_rvh, popup->GetRenderViewHost());
1503 EXPECT_TRUE(webui_rvh->IsRenderViewLive()); 1503 EXPECT_TRUE(webui_rvh->IsRenderViewLive());
1504 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI, 1504 EXPECT_EQ(content::BINDINGS_POLICY_WEB_UI,
1505 webui_rvh->GetMainFrame()->GetEnabledBindings()); 1505 webui_rvh->GetMainFrame()->GetEnabledBindings());
1506 } 1506 }
1507 1507
1508 } // namespace 1508 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/browser_tab_strip_model_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698