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

Side by Side Diff: ash/shell_unittest.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/screen_ash_unittest.cc ('k') | ash/system/tray/system_tray.cc » ('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/launcher/launcher.h" 6 #include "ash/launcher/launcher.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 Shell::TestApi test_api(shell); 260 Shell::TestApi test_api(shell);
261 261
262 // We start with the usual window containers. 262 // We start with the usual window containers.
263 ExpectAllContainers(); 263 ExpectAllContainers();
264 // We have a default container event filter (for window drags). 264 // We have a default container event filter (for window drags).
265 EXPECT_TRUE(GetDefaultContainer()->event_filter()); 265 EXPECT_TRUE(GetDefaultContainer()->event_filter());
266 // Launcher is visible. 266 // Launcher is visible.
267 views::Widget* launcher_widget = shell->launcher()->widget(); 267 views::Widget* launcher_widget = shell->launcher()->widget();
268 EXPECT_TRUE(launcher_widget->IsVisible()); 268 EXPECT_TRUE(launcher_widget->IsVisible());
269 // Launcher is at bottom-left of screen. 269 // Launcher is at bottom-left of screen.
270 EXPECT_EQ(0, launcher_widget->GetWindowScreenBounds().x()); 270 EXPECT_EQ(0, launcher_widget->GetWindowBoundsInScreen().x());
271 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(), 271 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHostSize().height(),
272 launcher_widget->GetWindowScreenBounds().bottom()); 272 launcher_widget->GetWindowBoundsInScreen().bottom());
273 // We have a desktop background but not a bare layer. 273 // We have a desktop background but not a bare layer.
274 EXPECT_TRUE(test_api.root_window_layout()->background_widget()); 274 EXPECT_TRUE(test_api.root_window_layout()->background_widget());
275 EXPECT_FALSE(test_api.root_window_layout()->background_layer()); 275 EXPECT_FALSE(test_api.root_window_layout()->background_layer());
276 276
277 // Create a normal window. It is not maximized. 277 // Create a normal window. It is not maximized.
278 views::Widget::InitParams widget_params( 278 views::Widget::InitParams widget_params(
279 views::Widget::InitParams::TYPE_WINDOW); 279 views::Widget::InitParams::TYPE_WINDOW);
280 widget_params.bounds.SetRect(11, 22, 300, 400); 280 widget_params.bounds.SetRect(11, 22, 300, 400);
281 views::Widget* widget = CreateTestWindow(widget_params); 281 views::Widget* widget = CreateTestWindow(widget_params);
282 widget->Show(); 282 widget->Show();
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 private: 333 private:
334 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 334 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
335 }; 335 };
336 336
337 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 337 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
338 window_.reset(new aura::Window(NULL)); 338 window_.reset(new aura::Window(NULL));
339 window_->Init(ui::LAYER_NOT_DRAWN); 339 window_->Init(ui::LAYER_NOT_DRAWN);
340 } 340 }
341 341
342 } // namespace ash 342 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_ash_unittest.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698