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

Side by Side Diff: components/exo/shell_surface_unittest.cc

Issue 2250713006: Allow updating arc widget bounds in maximize/fullscreen state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 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 | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 #include "ash/common/shell_window_ids.h" 6 #include "ash/common/shell_window_ids.h"
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm/wm_event.h" 8 #include "ash/common/wm/wm_event.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/wm/window_state_aura.h" 10 #include "ash/wm/window_state_aura.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 // Shadow overlay bounds. 526 // Shadow overlay bounds.
527 EXPECT_TRUE(shadow->layer()->visible()); 527 EXPECT_TRUE(shadow->layer()->visible());
528 // Origin must be in sync. 528 // Origin must be in sync.
529 EXPECT_EQ(expected_shadow_origin, 529 EXPECT_EQ(expected_shadow_origin,
530 shadow->layer()->parent()->bounds().origin()); 530 shadow->layer()->parent()->bounds().origin());
531 531
532 const gfx::Rect work_area = 532 const gfx::Rect work_area =
533 display::Screen::GetScreen()->GetPrimaryDisplay().work_area(); 533 display::Screen::GetScreen()->GetPrimaryDisplay().work_area();
534 // Maximizing window hides the shadow. 534 // Maximizing window hides the shadow.
535 widget->Maximize(); 535 widget->Maximize();
536 ASSERT_EQ(work_area, window->bounds()); 536 ASSERT_TRUE(widget->IsMaximized());
537 EXPECT_FALSE(shadow->layer()->visible()); 537 EXPECT_FALSE(shadow->layer()->visible());
538 538
539 shell_surface->SetRectangularShadow(work_area); 539 shell_surface->SetRectangularShadow(work_area);
540 surface->Commit(); 540 surface->Commit();
541 EXPECT_FALSE(shadow->layer()->visible()); 541 EXPECT_FALSE(shadow->layer()->visible());
542 542
543 // Restoring bounds will re-enable shadow. It's content size is set to work 543 // Restoring bounds will re-enable shadow. It's content size is set to work
544 // area,/ thus not visible until new bounds is committed. 544 // area,/ thus not visible until new bounds is committed.
545 widget->Restore(); 545 widget->Restore();
546 EXPECT_TRUE(shadow->layer()->visible()); 546 EXPECT_TRUE(shadow->layer()->visible());
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 // Leave fullscreen mode. 642 // Leave fullscreen mode.
643 window->GetWindowState()->OnWMEvent(&event); 643 window->GetWindowState()->OnWMEvent(&event);
644 644
645 // Check that shell surface is maximized. 645 // Check that shell surface is maximized.
646 EXPECT_EQ(CurrentContext()->bounds().width(), 646 EXPECT_EQ(CurrentContext()->bounds().width(),
647 shell_surface->GetWidget()->GetWindowBoundsInScreen().width()); 647 shell_surface->GetWidget()->GetWindowBoundsInScreen().width());
648 } 648 }
649 649
650 } // namespace 650 } // namespace
651 } // namespace exo 651 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/shell_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698