OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shelf/shelf_window_watcher.h" | 5 #include "ash/shelf/shelf_window_watcher.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shelf/shelf_item_types.h" | 8 #include "ash/shelf/shelf_item_types.h" |
9 #include "ash/shelf/shelf_model.h" | 9 #include "ash/shelf/shelf_model.h" |
10 #include "ash/shelf/shelf_util.h" | 10 #include "ash/shelf/shelf_util.h" |
11 #include "ash/shell.h" | 11 #include "ash/shell.h" |
12 #include "ash/shell_window_ids.h" | 12 #include "ash/shell_window_ids.h" |
13 #include "ash/test/ash_test_base.h" | 13 #include "ash/test/ash_test_base.h" |
14 #include "ash/test/shell_test_api.h" | 14 #include "ash/test/shell_test_api.h" |
15 #include "ash/wm/window_resizer.h" | 15 #include "ash/wm/window_resizer.h" |
16 #include "ash/wm/window_state.h" | 16 #include "ash/wm/window_state.h" |
17 #include "ash/wm/window_util.h" | 17 #include "ash/wm/window_util.h" |
18 #include "base/command_line.h" | 18 #include "base/command_line.h" |
19 #include "ui/aura/client/aura_constants.h" | 19 #include "ui/aura/client/aura_constants.h" |
20 #include "ui/aura/window.h" | 20 #include "ui/aura/window.h" |
21 #include "ui/base/hit_test.h" | 21 #include "ui/base/hit_test.h" |
22 | 22 |
23 namespace ash { | 23 namespace ash { |
24 namespace internal { | |
25 | 24 |
26 class ShelfWindowWatcherTest : public test::AshTestBase { | 25 class ShelfWindowWatcherTest : public test::AshTestBase { |
27 public: | 26 public: |
28 ShelfWindowWatcherTest() : model_(NULL) {} | 27 ShelfWindowWatcherTest() : model_(NULL) {} |
29 virtual ~ShelfWindowWatcherTest() {} | 28 virtual ~ShelfWindowWatcherTest() {} |
30 | 29 |
31 virtual void SetUp() OVERRIDE { | 30 virtual void SetUp() OVERRIDE { |
32 test::AshTestBase::SetUp(); | 31 test::AshTestBase::SetUp(); |
33 model_ = test::ShellTestApi(Shell::GetInstance()).shelf_model(); | 32 model_ = test::ShellTestApi(Shell::GetInstance()).shelf_model(); |
34 } | 33 } |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 // Item should be removed when |window| is re-parented not to default | 278 // Item should be removed when |window| is re-parented not to default |
280 // container before fininshing the dragging. | 279 // container before fininshing the dragging. |
281 EXPECT_TRUE(wm::GetWindowState(window.get())->is_dragged()); | 280 EXPECT_TRUE(wm::GetWindowState(window.get())->is_dragged()); |
282 new_parent->AddChild(window.get()); | 281 new_parent->AddChild(window.get()); |
283 EXPECT_EQ(1, model_->item_count()); | 282 EXPECT_EQ(1, model_->item_count()); |
284 } | 283 } |
285 EXPECT_FALSE(wm::GetWindowState(window.get())->is_dragged()); | 284 EXPECT_FALSE(wm::GetWindowState(window.get())->is_dragged()); |
286 EXPECT_EQ(1, model_->item_count()); | 285 EXPECT_EQ(1, model_->item_count()); |
287 } | 286 } |
288 | 287 |
289 } // namespace internal | |
290 } // namespace ash | 288 } // namespace ash |
OLD | NEW |