Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: ash/shell_unittest.cc

Issue 10810039: 2nd display should show the same background as login/lock screen: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add OVERRIDE Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell_factory.h ('k') | ash/shell_window_ids.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ash_switches.h" 5 #include "ash/ash_switches.h"
6 #include "ash/desktop_background/desktop_background_widget_controller.h"
6 #include "ash/launcher/launcher.h" 7 #include "ash/launcher/launcher.h"
7 #include "ash/shell.h" 8 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
9 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
10 #include "ash/test/ash_test_base.h" 11 #include "ash/test/ash_test_base.h"
11 #include "ash/wm/root_window_layout_manager.h" 12 #include "ash/wm/root_window_layout_manager.h"
12 #include "ash/wm/shelf_layout_manager.h" 13 #include "ash/wm/shelf_layout_manager.h"
13 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
14 #include "ui/aura/client/aura_constants.h" 15 #include "ui/aura/client/aura_constants.h"
15 #include "ui/aura/root_window.h" 16 #include "ui/aura/root_window.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 root_window, internal::kShellWindowId_DefaultContainer)); 52 root_window, internal::kShellWindowId_DefaultContainer));
52 EXPECT_TRUE(Shell::GetContainer( 53 EXPECT_TRUE(Shell::GetContainer(
53 root_window, internal::kShellWindowId_AlwaysOnTopContainer)); 54 root_window, internal::kShellWindowId_AlwaysOnTopContainer));
54 EXPECT_TRUE(Shell::GetContainer( 55 EXPECT_TRUE(Shell::GetContainer(
55 root_window, internal::kShellWindowId_PanelContainer)); 56 root_window, internal::kShellWindowId_PanelContainer));
56 EXPECT_TRUE(Shell::GetContainer( 57 EXPECT_TRUE(Shell::GetContainer(
57 root_window, internal::kShellWindowId_LauncherContainer)); 58 root_window, internal::kShellWindowId_LauncherContainer));
58 EXPECT_TRUE(Shell::GetContainer( 59 EXPECT_TRUE(Shell::GetContainer(
59 root_window, internal::kShellWindowId_SystemModalContainer)); 60 root_window, internal::kShellWindowId_SystemModalContainer));
60 EXPECT_TRUE(Shell::GetContainer( 61 EXPECT_TRUE(Shell::GetContainer(
62 root_window, internal::kShellWindowId_LockScreenBackgroundContainer));
63 EXPECT_TRUE(Shell::GetContainer(
61 root_window, internal::kShellWindowId_LockScreenContainer)); 64 root_window, internal::kShellWindowId_LockScreenContainer));
62 EXPECT_TRUE(Shell::GetContainer( 65 EXPECT_TRUE(Shell::GetContainer(
63 root_window, internal::kShellWindowId_LockSystemModalContainer)); 66 root_window, internal::kShellWindowId_LockSystemModalContainer));
64 EXPECT_TRUE(Shell::GetContainer( 67 EXPECT_TRUE(Shell::GetContainer(
65 root_window, internal::kShellWindowId_StatusContainer)); 68 root_window, internal::kShellWindowId_StatusContainer));
66 EXPECT_TRUE(Shell::GetContainer( 69 EXPECT_TRUE(Shell::GetContainer(
67 root_window, internal::kShellWindowId_MenuContainer)); 70 root_window, internal::kShellWindowId_MenuContainer));
68 EXPECT_TRUE(Shell::GetContainer( 71 EXPECT_TRUE(Shell::GetContainer(
69 root_window, internal::kShellWindowId_DragImageAndTooltipContainer)); 72 root_window, internal::kShellWindowId_DragImageAndTooltipContainer));
70 EXPECT_TRUE(Shell::GetContainer( 73 EXPECT_TRUE(Shell::GetContainer(
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // We have a default container event filter (for window drags). 267 // We have a default container event filter (for window drags).
265 EXPECT_TRUE(GetDefaultContainer()->event_filter()); 268 EXPECT_TRUE(GetDefaultContainer()->event_filter());
266 // Launcher is visible. 269 // Launcher is visible.
267 views::Widget* launcher_widget = shell->launcher()->widget(); 270 views::Widget* launcher_widget = shell->launcher()->widget();
268 EXPECT_TRUE(launcher_widget->IsVisible()); 271 EXPECT_TRUE(launcher_widget->IsVisible());
269 // Launcher is at bottom-left of screen. 272 // Launcher is at bottom-left of screen.
270 EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x()); 273 EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x());
271 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(), 274 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(),
272 launcher_widget->GetWindowBoundsInScreen().bottom()); 275 launcher_widget->GetWindowBoundsInScreen().bottom());
273 // We have a desktop background but not a bare layer. 276 // We have a desktop background but not a bare layer.
274 EXPECT_TRUE(test_api.root_window_layout()->background_widget()); 277 // TODO (antrim): enable once we find out why it fails component build.
275 EXPECT_FALSE(test_api.root_window_layout()->background_layer()); 278 // internal::DesktopBackgroundWidgetController* background =
279 // Shell::GetPrimaryRootWindow()->
280 // GetProperty(internal::kWindowDesktopComponent);
281 // EXPECT_TRUE(background);
282 // EXPECT_TRUE(background->widget());
283 // EXPECT_FALSE(background->layer());
276 284
277 // Create a normal window. It is not maximized. 285 // Create a normal window. It is not maximized.
278 views::Widget::InitParams widget_params( 286 views::Widget::InitParams widget_params(
279 views::Widget::InitParams::TYPE_WINDOW); 287 views::Widget::InitParams::TYPE_WINDOW);
280 widget_params.bounds.SetRect(11, 22, 300, 400); 288 widget_params.bounds.SetRect(11, 22, 300, 400);
281 views::Widget* widget = CreateTestWindow(widget_params); 289 views::Widget* widget = CreateTestWindow(widget_params);
282 widget->Show(); 290 widget->Show();
283 EXPECT_FALSE(widget->IsMaximized()); 291 EXPECT_FALSE(widget->IsMaximized());
284 292
285 // Clean up. 293 // Clean up.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 private: 341 private:
334 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 342 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
335 }; 343 };
336 344
337 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 345 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
338 window_.reset(new aura::Window(NULL)); 346 window_.reset(new aura::Window(NULL));
339 window_->Init(ui::LAYER_NOT_DRAWN); 347 window_->Init(ui::LAYER_NOT_DRAWN);
340 } 348 }
341 349
342 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_factory.h ('k') | ash/shell_window_ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698