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/scoped_target_root_window.h" | 5 #include "ash/scoped_target_root_window.h" |
6 #include "ash/screen_util.h" | 6 #include "ash/screen_util.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "ash/test/test_shell_delegate.h" | 9 #include "ash/test/test_shell_delegate.h" |
10 #include "ash/wm/window_positioner.h" | 10 #include "ash/wm/window_positioner.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 Browser::CreateParams* params) { | 36 Browser::CreateParams* params) { |
37 if (!bounds.IsEmpty()) | 37 if (!bounds.IsEmpty()) |
38 window->SetBounds(bounds); | 38 window->SetBounds(bounds); |
39 scoped_ptr<Browser> browser = | 39 scoped_ptr<Browser> browser = |
40 chrome::CreateBrowserWithAuraTestWindowForParams(make_scoped_ptr(window), | 40 chrome::CreateBrowserWithAuraTestWindowForParams(make_scoped_ptr(window), |
41 params); | 41 params); |
42 if (browser->is_type_tabbed() || browser->is_app()) { | 42 if (browser->is_type_tabbed() || browser->is_app()) { |
43 ash::wm::GetWindowState(browser->window()->GetNativeWindow()) | 43 ash::wm::GetWindowState(browser->window()->GetNativeWindow()) |
44 ->set_window_position_managed(true); | 44 ->set_window_position_managed(true); |
45 } | 45 } |
46 return browser.Pass(); | 46 return browser; |
47 } | 47 } |
48 | 48 |
49 } // namespace | 49 } // namespace |
50 | 50 |
51 // On desktop linux aura, we currently don't use the ash frame, breaking some | 51 // On desktop linux aura, we currently don't use the ash frame, breaking some |
52 // tests which expect ash sizes: http://crbug.com/303862 | 52 // tests which expect ash sizes: http://crbug.com/303862 |
53 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 53 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
54 #define MAYBE_DefaultSizeCase DISABLED_DefaultSizeCase | 54 #define MAYBE_DefaultSizeCase DISABLED_DefaultSizeCase |
55 #else | 55 #else |
56 #define MAYBE_DefaultSizeCase DefaultSizeCase | 56 #define MAYBE_DefaultSizeCase DefaultSizeCase |
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
905 EXPECT_EQ( | 905 EXPECT_EQ( |
906 ui::SHOW_STATE_DEFAULT, | 906 ui::SHOW_STATE_DEFAULT, |
907 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, | 907 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, |
908 trusted_popup.get(), p1280x1024, p1600x1200)); | 908 trusted_popup.get(), p1280x1024, p1600x1200)); |
909 // A popup that is sized to occupy the whole work area has default state. | 909 // A popup that is sized to occupy the whole work area has default state. |
910 EXPECT_EQ( | 910 EXPECT_EQ( |
911 ui::SHOW_STATE_DEFAULT, | 911 ui::SHOW_STATE_DEFAULT, |
912 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, | 912 GetWindowShowState(ui::SHOW_STATE_DEFAULT, ui::SHOW_STATE_NORMAL, BOTH, |
913 trusted_popup.get(), p1600x1200, p1600x1200)); | 913 trusted_popup.get(), p1600x1200, p1600x1200)); |
914 } | 914 } |
OLD | NEW |