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 "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" | 5 #include "chrome/browser/ui/window_sizer/window_sizer_common_unittest.h" |
6 | 6 |
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_resizer.h" | 10 #include "ash/wm/window_resizer.h" |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Note: It is important to delete the thread after the browser instances got | 88 // Note: It is important to delete the thread after the browser instances got |
89 // deleted. For this we transfer the thread here. | 89 // deleted. For this we transfer the thread here. |
90 scoped_ptr<content::TestBrowserThread> ui_thread_; | 90 scoped_ptr<content::TestBrowserThread> ui_thread_; |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(WindowSizerTestWithBrowser); | 92 DISALLOW_COPY_AND_ASSIGN(WindowSizerTestWithBrowser); |
93 }; | 93 }; |
94 | 94 |
95 // The class function definitions from window_sizer_common_unittest.h | 95 // The class function definitions from window_sizer_common_unittest.h |
96 WindowSizerTestWithBrowser::WindowSizerTestWithBrowser() { | 96 WindowSizerTestWithBrowser::WindowSizerTestWithBrowser() { |
97 // Set up a UI message thread. | 97 // Set up a UI message thread. |
98 MessageLoopForUI* ui_loop = message_loop(); | 98 base::MessageLoopForUI* ui_loop = message_loop(); |
99 ui_thread_.reset( | 99 ui_thread_.reset( |
100 new content::TestBrowserThread(content::BrowserThread::UI, ui_loop)); | 100 new content::TestBrowserThread(content::BrowserThread::UI, ui_loop)); |
101 } | 101 } |
102 | 102 |
103 WindowSizerTestWithBrowser::~WindowSizerTestWithBrowser() { | 103 WindowSizerTestWithBrowser::~WindowSizerTestWithBrowser() { |
104 } | 104 } |
105 | 105 |
106 } | 106 } |
107 // Test that the window is sized appropriately for the first run experience | 107 // Test that the window is sized appropriately for the first run experience |
108 // where the default window bounds calculation is invoked. | 108 // where the default window bounds calculation is invoked. |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 browser.get(), | 890 browser.get(), |
891 p1600x1200), ui::SHOW_STATE_MAXIMIZED); | 891 p1600x1200), ui::SHOW_STATE_MAXIMIZED); |
892 | 892 |
893 // The popup should favor the initial show state over the command line. | 893 // The popup should favor the initial show state over the command line. |
894 EXPECT_EQ(GetWindowShowState(ui::SHOW_STATE_NORMAL, | 894 EXPECT_EQ(GetWindowShowState(ui::SHOW_STATE_NORMAL, |
895 ui::SHOW_STATE_NORMAL, | 895 ui::SHOW_STATE_NORMAL, |
896 BOTH, | 896 BOTH, |
897 popup_browser.get(), | 897 popup_browser.get(), |
898 p1600x1200), ui::SHOW_STATE_NORMAL); | 898 p1600x1200), ui::SHOW_STATE_NORMAL); |
899 } | 899 } |
OLD | NEW |