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

Unified Diff: ash/common/shelf/shelf_window_watcher_unittest.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/default_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_window_watcher_unittest.cc
diff --git a/ash/common/shelf/shelf_window_watcher_unittest.cc b/ash/common/shelf/shelf_window_watcher_unittest.cc
index a3232c0b141978578e0e3806036d0bf91910666e..7e5ed90cb248516043d79177634c895c207df6d5 100644
--- a/ash/common/shelf/shelf_window_watcher_unittest.cc
+++ b/ash/common/shelf/shelf_window_watcher_unittest.cc
@@ -18,7 +18,6 @@
#include "ash/test/ash_test_base.h"
#include "ui/aura/window.h"
#include "ui/base/hit_test.h"
-#include "ui/compositor/layer_type.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -225,45 +224,6 @@ TEST_F(ShelfWindowWatcherTest, MaximizeAndRestoreWindow) {
EXPECT_EQ(id, model_->items()[index].id);
}
-// Check that an item is maintained when its associated Window is docked.
-TEST_F(ShelfWindowWatcherTest, DockWindow) {
- // TODO: investigate failure in mash. http://crbug.com/695562.
- if (WmShell::Get()->IsRunningInMash())
- return;
-
- // ShelfModel only has an APP_LIST item.
- EXPECT_EQ(1, model_->item_count());
-
- std::unique_ptr<views::Widget> widget =
- CreateTestWidget(nullptr, kShellWindowId_DefaultContainer, gfx::Rect());
- WmWindow* window = WmWindow::Get(widget->GetNativeWindow());
-
- // Create a ShelfItem for |window|.
- ShelfID id = CreateShelfItem(window);
- EXPECT_EQ(2, model_->item_count());
-
- int index = model_->ItemIndexByID(id);
- EXPECT_EQ(STATUS_ACTIVE, model_->items()[index].status);
-
- WmWindow* root_window = window->GetRootWindow();
- WmWindow* default_container =
- root_window->GetChildByShellWindowId(kShellWindowId_DefaultContainer);
- EXPECT_EQ(default_container, window->GetParent());
-
- WmWindow* docked_container =
- root_window->GetChildByShellWindowId(kShellWindowId_DockedContainer);
-
- // Check |window|'s item is not removed when it is re-parented to the dock.
- docked_container->AddChild(window);
- EXPECT_EQ(docked_container, window->GetParent());
- EXPECT_EQ(2, model_->item_count());
-
- // The shelf item is removed when the window is closed, even if it is in the
- // docked container at the time.
- widget.reset();
- EXPECT_EQ(1, model_->item_count());
-}
-
// Check |window|'s item is not changed during the dragging.
// TODO(simonhong): Add a test for removing a Window during the dragging.
TEST_F(ShelfWindowWatcherTest, DragWindow) {
« no previous file with comments | « ash/common/shelf/shelf_layout_manager.cc ('k') | ash/common/wm/default_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698