| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); | 67 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); |
| 68 window_server_.reset(new WindowServer(&window_server_delegate_, | 68 window_server_.reset(new WindowServer(&window_server_delegate_, |
| 69 scoped_refptr<SurfacesState>())); | 69 scoped_refptr<SurfacesState>())); |
| 70 window_server_delegate_.set_window_server(window_server_.get()); | 70 window_server_delegate_.set_window_server(window_server_.get()); |
| 71 } | 71 } |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 int32_t cursor_id_; | 74 int32_t cursor_id_; |
| 75 TestPlatformDisplayFactory platform_display_factory_; | 75 TestPlatformDisplayFactory platform_display_factory_; |
| 76 TestWindowServerDelegate window_server_delegate_; | 76 TestWindowServerDelegate window_server_delegate_; |
| 77 scoped_ptr<WindowServer> window_server_; | 77 std::unique_ptr<WindowServer> window_server_; |
| 78 base::MessageLoop message_loop_; | 78 base::MessageLoop message_loop_; |
| 79 TestWindowManagerFactory test_window_manager_factory_; | 79 TestWindowManagerFactory test_window_manager_factory_; |
| 80 | 80 |
| 81 DISALLOW_COPY_AND_ASSIGN(DisplayTest); | 81 DISALLOW_COPY_AND_ASSIGN(DisplayTest); |
| 82 }; | 82 }; |
| 83 | 83 |
| 84 TEST_F(DisplayTest, CallsCreateDefaultDisplays) { | 84 TEST_F(DisplayTest, CallsCreateDefaultDisplays) { |
| 85 const int kNumHostsToCreate = 2; | 85 const int kNumHostsToCreate = 2; |
| 86 window_server_delegate_.set_num_displays_to_create(kNumHostsToCreate); | 86 window_server_delegate_.set_num_displays_to_create(kNumHostsToCreate); |
| 87 | 87 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 EXPECT_TRUE(window_tree_binding2->client()->tracker()->changes()->empty()); | 332 EXPECT_TRUE(window_tree_binding2->client()->tracker()->changes()->empty()); |
| 333 window_tree_binding1->client()->tracker()->changes()->clear(); | 333 window_tree_binding1->client()->tracker()->changes()->clear(); |
| 334 window_tree_binding2->client()->tracker()->changes()->clear(); | 334 window_tree_binding2->client()->tracker()->changes()->clear(); |
| 335 EXPECT_FALSE(display1->GetFocusedWindow()); | 335 EXPECT_FALSE(display1->GetFocusedWindow()); |
| 336 EXPECT_EQ(child2, display2->GetFocusedWindow()); | 336 EXPECT_EQ(child2, display2->GetFocusedWindow()); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace test | 339 } // namespace test |
| 340 } // namespace ws | 340 } // namespace ws |
| 341 } // namespace mus | 341 } // namespace mus |
| OLD | NEW |