| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_controller.h" | 5 #include "ash/shelf/shelf_controller.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ash/public/cpp/config.h" | 10 #include "ash/public/cpp/config.h" |
| 11 #include "ash/public/cpp/shelf_model.h" |
| 12 #include "ash/public/cpp/shelf_model_observer.h" |
| 11 #include "ash/public/interfaces/shelf.mojom.h" | 13 #include "ash/public/interfaces/shelf.mojom.h" |
| 12 #include "ash/shelf/shelf.h" | 14 #include "ash/shelf/shelf.h" |
| 13 #include "ash/shelf/shelf_model.h" | |
| 14 #include "ash/shelf/shelf_model_observer.h" | |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "ash/test/ash_test_base.h" | 16 #include "ash/test/ash_test_base.h" |
| 17 #include "mojo/public/cpp/bindings/associated_binding.h" | 17 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 18 #include "ui/display/types/display_constants.h" | 18 #include "ui/display/types/display_constants.h" |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // A test implementation of the ShelfObserver mojo interface. | 23 // A test implementation of the ShelfObserver mojo interface. |
| 24 class TestShelfObserver : public mojom::ShelfObserver { | 24 class TestShelfObserver : public mojom::ShelfObserver { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // |observer| is not notified; see mojom::ShelfController for rationale. | 183 // |observer| is not notified; see mojom::ShelfController for rationale. |
| 184 controller->RemoveShelfItem(item.id); | 184 controller->RemoveShelfItem(item.id); |
| 185 base::RunLoop().RunUntilIdle(); | 185 base::RunLoop().RunUntilIdle(); |
| 186 EXPECT_EQ(1, controller->model()->item_count()); | 186 EXPECT_EQ(1, controller->model()->item_count()); |
| 187 EXPECT_EQ(2u, observer.added_count()); | 187 EXPECT_EQ(2u, observer.added_count()); |
| 188 EXPECT_EQ(1u, observer.removed_count()); | 188 EXPECT_EQ(1u, observer.removed_count()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace | 191 } // namespace |
| 192 } // namespace ash | 192 } // namespace ash |
| OLD | NEW |