OLD | NEW |
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 "ash/screen_ash.h" | 5 #include "ash/screen_ash.h" |
6 #include "ash/shell.h" | 6 #include "ash/shell.h" |
7 #include "ash/test/ash_test_base.h" | 7 #include "ash/test/ash_test_base.h" |
8 #include "ash/test/test_shell_delegate.h" | 8 #include "ash/test/test_shell_delegate.h" |
9 #include "ash/wm/window_resizer.h" | 9 #include "ash/wm/window_resizer.h" |
10 #include "ash/wm/window_settings.h" | 10 #include "ash/wm/window_state.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
13 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" | 13 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
16 #include "content/public/test/render_view_test.h" | 16 #include "content/public/test/render_view_test.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "ui/aura/client/activation_client.h" | 18 #include "ui/aura/client/activation_client.h" |
19 #include "ui/aura/client/aura_constants.h" | 19 #include "ui/aura/client/aura_constants.h" |
20 #include "ui/aura/env.h" | 20 #include "ui/aura/env.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 return native_window_->bounds(); | 55 return native_window_->bounds(); |
56 } | 56 } |
57 | 57 |
58 Browser* browser() { return browser_.get(); } | 58 Browser* browser() { return browser_.get(); } |
59 | 59 |
60 void CreateBrowser(const Browser::CreateParams& params) { | 60 void CreateBrowser(const Browser::CreateParams& params) { |
61 Browser::CreateParams create_params = params; | 61 Browser::CreateParams create_params = params; |
62 create_params.window = this; | 62 create_params.window = this; |
63 browser_.reset(new Browser(create_params)); | 63 browser_.reset(new Browser(create_params)); |
64 if (browser_->is_type_tabbed() || browser_->is_app()) { | 64 if (browser_->is_type_tabbed() || browser_->is_app()) { |
65 ash::wm::GetWindowSettings(native_window_.get())-> | 65 ash::wm::GetWindowState(native_window_.get())-> |
66 set_window_position_managed(true); | 66 set_window_position_managed(true); |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 private: | 70 private: |
71 scoped_ptr<Browser> browser_; | 71 scoped_ptr<Browser> browser_; |
72 scoped_ptr<aura::Window> native_window_; | 72 scoped_ptr<aura::Window> native_window_; |
73 | 73 |
74 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura); | 74 DISALLOW_COPY_AND_ASSIGN(TestBrowserWindowAura); |
75 }; | 75 }; |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 browser_window->browser(), | 832 browser_window->browser(), |
833 p1600x1200), ui::SHOW_STATE_MAXIMIZED); | 833 p1600x1200), ui::SHOW_STATE_MAXIMIZED); |
834 | 834 |
835 // The popup should favor the initial show state over the command line. | 835 // The popup should favor the initial show state over the command line. |
836 EXPECT_EQ(GetWindowShowState(ui::SHOW_STATE_NORMAL, | 836 EXPECT_EQ(GetWindowShowState(ui::SHOW_STATE_NORMAL, |
837 ui::SHOW_STATE_NORMAL, | 837 ui::SHOW_STATE_NORMAL, |
838 BOTH, | 838 BOTH, |
839 browser_popup->browser(), | 839 browser_popup->browser(), |
840 p1600x1200), ui::SHOW_STATE_NORMAL); | 840 p1600x1200), ui::SHOW_STATE_NORMAL); |
841 } | 841 } |
OLD | NEW |