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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view_interactive_uitest.cc

Issue 1662783002: Remove HostDesktopType from Browser::CreateParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-12
Patch Set: remove desktop_type_ in bookmark_bubble_sign_in_delegate Created 4 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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/ui/browser_commands.h" 8 #include "chrome/browser/ui/browser_commands.h"
9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } // namespace 55 } // namespace
56 56
57 // Test that docked state is remembered for app browser windows and not 57 // Test that docked state is remembered for app browser windows and not
58 // remembered for tabbed browser windows. 58 // remembered for tabbed browser windows.
59 IN_PROC_BROWSER_TEST_P(BrowserViewTestParam, BrowserRemembersDockedState) { 59 IN_PROC_BROWSER_TEST_P(BrowserViewTestParam, BrowserRemembersDockedState) {
60 // Open a new browser window (app or tabbed depending on a parameter). 60 // Open a new browser window (app or tabbed depending on a parameter).
61 bool test_app = TestApp(); 61 bool test_app = TestApp();
62 Browser::CreateParams params = 62 Browser::CreateParams params =
63 test_app ? Browser::CreateParams::CreateForApp( 63 test_app ? Browser::CreateParams::CreateForApp(
64 "test_browser_app", true /* trusted_source */, gfx::Rect(), 64 "test_browser_app", true /* trusted_source */, gfx::Rect(),
65 browser()->profile(), browser()->host_desktop_type()) 65 browser()->profile())
66 : Browser::CreateParams(browser()->profile(), 66 : Browser::CreateParams(browser()->profile());
67 browser()->host_desktop_type());
68 params.initial_show_state = ui::SHOW_STATE_DEFAULT; 67 params.initial_show_state = ui::SHOW_STATE_DEFAULT;
69 bool is_ash = browser()->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH; 68 bool is_ash = browser()->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH;
70 // Default |browser()| is not used by this test. 69 // Default |browser()| is not used by this test.
71 browser()->window()->Close(); 70 browser()->window()->Close();
72 71
73 // Create a new app browser 72 // Create a new app browser
74 Browser* browser = new Browser(params); 73 Browser* browser = new Browser(params);
75 ASSERT_TRUE(browser); 74 ASSERT_TRUE(browser);
76 gfx::NativeWindow window = browser->window()->GetNativeWindow(); 75 gfx::NativeWindow window = browser->window()->GetNativeWindow();
77 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100)); 76 gfx::Rect original_bounds(gfx::Rect(150, 250, 400, 100));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 window = browser->window()->GetNativeWindow(); 147 window = browser->window()->GetNativeWindow();
149 EXPECT_EQ(expected_bounds.ToString(), window->GetTargetBounds().ToString()); 148 EXPECT_EQ(expected_bounds.ToString(), window->GetTargetBounds().ToString());
150 EXPECT_EQ(ui::SHOW_STATE_NORMAL, 149 EXPECT_EQ(ui::SHOW_STATE_NORMAL,
151 window->GetProperty(aura::client::kShowStateKey)); 150 window->GetProperty(aura::client::kShowStateKey));
152 } 151 }
153 152
154 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp, 153 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp,
155 BrowserViewTestParam, 154 BrowserViewTestParam,
156 testing::Bool()); 155 testing::Bool());
157 #endif 156 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698