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

Side by Side Diff: ash/shell_unittest.cc

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years 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/host/transformer_helper.cc ('k') | ash/wm/boot_splash_screen_chromeos.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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/session/session_state_delegate.h" 10 #include "ash/common/session/session_state_delegate.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 369
370 TEST_F(ShellTest, ManagedWindowModeBasics) { 370 TEST_F(ShellTest, ManagedWindowModeBasics) {
371 // We start with the usual window containers. 371 // We start with the usual window containers.
372 ExpectAllContainers(); 372 ExpectAllContainers();
373 // Shelf is visible. 373 // Shelf is visible.
374 ShelfWidget* shelf_widget = GetPrimaryShelf()->shelf_widget(); 374 ShelfWidget* shelf_widget = GetPrimaryShelf()->shelf_widget();
375 EXPECT_TRUE(shelf_widget->IsVisible()); 375 EXPECT_TRUE(shelf_widget->IsVisible());
376 // Shelf is at bottom-left of screen. 376 // Shelf is at bottom-left of screen.
377 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x()); 377 EXPECT_EQ(0, shelf_widget->GetWindowBoundsInScreen().x());
378 EXPECT_EQ(Shell::GetPrimaryRootWindow()->GetHost()->GetBounds().height(), 378 EXPECT_EQ(
379 shelf_widget->GetWindowBoundsInScreen().bottom()); 379 Shell::GetPrimaryRootWindow()->GetHost()->GetBoundsInPixels().height(),
380 shelf_widget->GetWindowBoundsInScreen().bottom());
380 // We have a wallpaper but not a bare layer. 381 // We have a wallpaper but not a bare layer.
381 // TODO (antrim): enable once we find out why it fails component build. 382 // TODO (antrim): enable once we find out why it fails component build.
382 // WallpaperWidgetController* wallpaper = 383 // WallpaperWidgetController* wallpaper =
383 // Shell::GetPrimaryRootWindow()-> 384 // Shell::GetPrimaryRootWindow()->
384 // GetProperty(kWindowDesktopComponent); 385 // GetProperty(kWindowDesktopComponent);
385 // EXPECT_TRUE(wallpaper); 386 // EXPECT_TRUE(wallpaper);
386 // EXPECT_TRUE(wallpaper->widget()); 387 // EXPECT_TRUE(wallpaper->widget());
387 // EXPECT_FALSE(wallpaper->layer()); 388 // EXPECT_FALSE(wallpaper->layer());
388 389
389 // Create a normal window. It is not maximized. 390 // Create a normal window. It is not maximized.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 private: 504 private:
504 DISALLOW_COPY_AND_ASSIGN(ShellTest2); 505 DISALLOW_COPY_AND_ASSIGN(ShellTest2);
505 }; 506 };
506 507
507 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) { 508 TEST_F(ShellTest2, DontCrashWhenWindowDeleted) {
508 window_.reset(new aura::Window(NULL)); 509 window_.reset(new aura::Window(NULL));
509 window_->Init(ui::LAYER_NOT_DRAWN); 510 window_->Init(ui::LAYER_NOT_DRAWN);
510 } 511 }
511 512
512 } // namespace ash 513 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/transformer_helper.cc ('k') | ash/wm/boot_splash_screen_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698