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

Side by Side Diff: ash/wm/workspace/workspace_manager2_unittest.cc

Issue 10905080: Exempt status bubble windows from status bar darkening (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review nit Created 8 years, 3 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/wm/workspace/workspace_manager2.cc ('k') | ash/wm/workspace/workspace_manager_unittest.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/wm/workspace/workspace_manager2.h" 5 #include "ash/wm/workspace/workspace_manager2.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/screen_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 461
462 scoped_ptr<Window> w1(CreateTestWindow()); 462 scoped_ptr<Window> w1(CreateTestWindow());
463 const gfx::Rect w1_bounds(0, 1, 101, 102); 463 const gfx::Rect w1_bounds(0, 1, 101, 102);
464 ShelfLayoutManager* shelf = Shell::GetInstance()->shelf(); 464 ShelfLayoutManager* shelf = Shell::GetInstance()->shelf();
465 const gfx::Rect touches_shelf_bounds( 465 const gfx::Rect touches_shelf_bounds(
466 0, shelf->GetIdealBounds().y() - 10, 101, 102); 466 0, shelf->GetIdealBounds().y() - 10, 101, 102);
467 // Move |w1| to overlap the shelf. 467 // Move |w1| to overlap the shelf.
468 w1->SetBounds(touches_shelf_bounds); 468 w1->SetBounds(touches_shelf_bounds);
469 EXPECT_FALSE(GetWindowOverlapsShelf()); 469 EXPECT_FALSE(GetWindowOverlapsShelf());
470 470
471 // A visible ignored window should not trigger the overlap.
472 scoped_ptr<Window> w_ignored(CreateTestWindow());
473 w_ignored->SetBounds(touches_shelf_bounds);
474 SetIgnoredByShelf(&(*w_ignored), true);
475 w_ignored->Show();
476 EXPECT_FALSE(GetWindowOverlapsShelf());
477
471 // Make it visible, since visible shelf overlaps should be true. 478 // Make it visible, since visible shelf overlaps should be true.
472 w1->Show(); 479 w1->Show();
473 EXPECT_TRUE(GetWindowOverlapsShelf()); 480 EXPECT_TRUE(GetWindowOverlapsShelf());
474 481
475 wm::ActivateWindow(w1.get()); 482 wm::ActivateWindow(w1.get());
476 w1->SetBounds(w1_bounds); 483 w1->SetBounds(w1_bounds);
477 w1->Show(); 484 w1->Show();
478 wm::ActivateWindow(w1.get()); 485 wm::ActivateWindow(w1.get());
479 486
480 EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state()); 487 EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state());
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 890 w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
884 w2->Show(); 891 w2->Show();
885 wm::ActivateWindow(w2.get()); 892 wm::ActivateWindow(w2.get());
886 893
887 // Switch to w1. 894 // Switch to w1.
888 wm::ActivateWindow(w1.get()); 895 wm::ActivateWindow(w1.get());
889 EXPECT_EQ(touches_shelf_bounds.ToString(), w1->bounds().ToString()); 896 EXPECT_EQ(touches_shelf_bounds.ToString(), w1->bounds().ToString());
890 } 897 }
891 } // namespace internal 898 } // namespace internal
892 } // namespace ash 899 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/workspace/workspace_manager2.cc ('k') | ash/wm/workspace/workspace_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698