OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shelf/shelf.h" | 5 #include "ash/shelf/shelf.h" |
6 #include "ash/shelf/shelf_view.h" | 6 #include "ash/shelf/shelf_view.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "ui/views/view_model.h" | 29 #include "ui/views/view_model.h" |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 class WindowSizerTest : public InProcessBrowserTest { | 33 class WindowSizerTest : public InProcessBrowserTest { |
34 public: | 34 public: |
35 WindowSizerTest() {} | 35 WindowSizerTest() {} |
36 ~WindowSizerTest() override {} | 36 ~WindowSizerTest() override {} |
37 | 37 |
38 void SetUpCommandLine(base::CommandLine* command_line) override { | 38 void SetUpCommandLine(base::CommandLine* command_line) override { |
39 InProcessBrowserTest::SetUpCommandLine(command_line); | |
40 // Make screens sufficiently wide to host 2 browsers side by side. | 39 // Make screens sufficiently wide to host 2 browsers side by side. |
41 command_line->AppendSwitchASCII("ash-host-window-bounds", | 40 command_line->AppendSwitchASCII("ash-host-window-bounds", |
42 "600x600,601+0-600x600"); | 41 "600x600,601+0-600x600"); |
43 } | 42 } |
44 | 43 |
45 private: | 44 private: |
46 DISALLOW_COPY_AND_ASSIGN(WindowSizerTest); | 45 DISALLOW_COPY_AND_ASSIGN(WindowSizerTest); |
47 }; | 46 }; |
48 | 47 |
49 void CloseBrowser(Browser* browser) { | 48 void CloseBrowser(Browser* browser) { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 196 |
198 CloseBrowser(browser_list->get(0)); | 197 CloseBrowser(browser_list->get(0)); |
199 OpenBrowserUsingContextMenuOnRootWindow(root_windows[0]); | 198 OpenBrowserUsingContextMenuOnRootWindow(root_windows[0]); |
200 | 199 |
201 // Next new browser must be created on 1st display. | 200 // Next new browser must be created on 1st display. |
202 ASSERT_EQ(1u, browser_list->size()); | 201 ASSERT_EQ(1u, browser_list->size()); |
203 EXPECT_EQ(root_windows[0], | 202 EXPECT_EQ(root_windows[0], |
204 browser_list->get(0)->window()->GetNativeWindow()->GetRootWindow()); | 203 browser_list->get(0)->window()->GetNativeWindow()->GetRootWindow()); |
205 EXPECT_EQ(root_windows[0], ash::Shell::GetRootWindowForNewWindows()); | 204 EXPECT_EQ(root_windows[0], ash::Shell::GetRootWindowForNewWindows()); |
206 } | 205 } |
OLD | NEW |