| OLD | NEW |
| 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 "chrome/browser/ui/browser_commands.h" | 7 #include "chrome/browser/ui/browser_commands.h" |
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 9 #include "chrome/test/base/in_process_browser_test.h" | 9 #include "chrome/test/base/in_process_browser_test.h" |
| 10 #include "ui/views/focus/focus_manager.h" | 10 #include "ui/views/focus/focus_manager.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 IN_PROC_BROWSER_TEST_P(BrowserViewTestParam, BrowserRemembersDockedState) { | 58 IN_PROC_BROWSER_TEST_P(BrowserViewTestParam, BrowserRemembersDockedState) { |
| 59 // Open a new browser window (app or tabbed depending on a parameter). | 59 // Open a new browser window (app or tabbed depending on a parameter). |
| 60 bool test_app = TestApp(); | 60 bool test_app = TestApp(); |
| 61 Browser::CreateParams params = | 61 Browser::CreateParams params = |
| 62 test_app ? Browser::CreateParams::CreateForApp( | 62 test_app ? Browser::CreateParams::CreateForApp( |
| 63 "test_browser_app", true /* trusted_source */, gfx::Rect(), | 63 "test_browser_app", true /* trusted_source */, gfx::Rect(), |
| 64 browser()->profile(), browser()->host_desktop_type()) | 64 browser()->profile(), browser()->host_desktop_type()) |
| 65 : Browser::CreateParams(browser()->profile(), | 65 : Browser::CreateParams(browser()->profile(), |
| 66 browser()->host_desktop_type()); | 66 browser()->host_desktop_type()); |
| 67 params.initial_show_state = ui::SHOW_STATE_DEFAULT; | 67 params.initial_show_state = ui::SHOW_STATE_DEFAULT; |
| 68 bool is_ash = browser()->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH; | 68 bool is_ash = browser()->host_desktop_type() == ui::HOST_DESKTOP_TYPE_ASH; |
| 69 // Default |browser()| is not used by this test. | 69 // Default |browser()| is not used by this test. |
| 70 browser()->window()->Close(); | 70 browser()->window()->Close(); |
| 71 | 71 |
| 72 // Create a new app browser | 72 // Create a new app browser |
| 73 Browser* browser = new Browser(params); | 73 Browser* browser = new Browser(params); |
| 74 ASSERT_TRUE(browser); | 74 ASSERT_TRUE(browser); |
| 75 gfx::NativeWindow window = browser->window()->GetNativeWindow(); | 75 gfx::NativeWindow window = browser->window()->GetNativeWindow(); |
| 76 gfx::Rect original_bounds(gfx::Rect(150, 250, 350, 100)); | 76 gfx::Rect original_bounds(gfx::Rect(150, 250, 350, 100)); |
| 77 window->SetBounds(original_bounds); | 77 window->SetBounds(original_bounds); |
| 78 window->Show(); | 78 window->Show(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 window = browser->window()->GetNativeWindow(); | 147 window = browser->window()->GetNativeWindow(); |
| 148 EXPECT_EQ(expected_bounds.ToString(), window->GetTargetBounds().ToString()); | 148 EXPECT_EQ(expected_bounds.ToString(), window->GetTargetBounds().ToString()); |
| 149 EXPECT_EQ(ui::SHOW_STATE_NORMAL, | 149 EXPECT_EQ(ui::SHOW_STATE_NORMAL, |
| 150 window->GetProperty(aura::client::kShowStateKey)); | 150 window->GetProperty(aura::client::kShowStateKey)); |
| 151 } | 151 } |
| 152 | 152 |
| 153 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp, | 153 INSTANTIATE_TEST_CASE_P(BrowserViewTestTabbedOrApp, |
| 154 BrowserViewTestParam, | 154 BrowserViewTestParam, |
| 155 testing::Bool()); | 155 testing::Bool()); |
| 156 #endif | 156 #endif |
| OLD | NEW |