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

Side by Side Diff: services/ui/ws/test_utils.cc

Issue 2833163002: Change ui cursor identifiers to an enum class. (Closed)
Patch Set: OK, it can't be explicit for mac. Created 3 years, 8 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
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/window_manager_state_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 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 "services/ui/ws/test_utils.h" 5 #include "services/ui/ws/test_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "cc/output/copy_output_request.h" 10 #include "cc/output/copy_output_request.h"
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 return std::move(binding); 523 return std::move(binding);
524 } 524 }
525 525
526 bool TestWindowServerDelegate::IsTestConfig() const { 526 bool TestWindowServerDelegate::IsTestConfig() const {
527 return true; 527 return true;
528 } 528 }
529 529
530 // WindowServerTestHelper --------------------------------------------------- 530 // WindowServerTestHelper ---------------------------------------------------
531 531
532 WindowServerTestHelper::WindowServerTestHelper() 532 WindowServerTestHelper::WindowServerTestHelper()
533 : cursor_id_(mojom::CursorType::CURSOR_NULL), 533 : cursor_id_(mojom::CursorType::kNull),
534 platform_display_factory_(&cursor_id_) { 534 platform_display_factory_(&cursor_id_) {
535 // Some tests create their own message loop, for example to add a task runner. 535 // Some tests create their own message loop, for example to add a task runner.
536 if (!base::MessageLoop::current()) 536 if (!base::MessageLoop::current())
537 message_loop_ = base::MakeUnique<base::MessageLoop>(); 537 message_loop_ = base::MakeUnique<base::MessageLoop>();
538 PlatformDisplay::set_factory_for_testing(&platform_display_factory_); 538 PlatformDisplay::set_factory_for_testing(&platform_display_factory_);
539 window_server_ = base::MakeUnique<WindowServer>(&window_server_delegate_); 539 window_server_ = base::MakeUnique<WindowServer>(&window_server_delegate_);
540 window_server_delegate_.set_window_server(window_server_.get()); 540 window_server_delegate_.set_window_server(window_server_.get());
541 } 541 }
542 542
543 WindowServerTestHelper::~WindowServerTestHelper() { 543 WindowServerTestHelper::~WindowServerTestHelper() {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 if (!tree->AddWindow(parent_client_id, client_window_id)) 690 if (!tree->AddWindow(parent_client_id, client_window_id))
691 return nullptr; 691 return nullptr;
692 if (client_id) 692 if (client_id)
693 *client_id = client_window_id; 693 *client_id = client_window_id;
694 return tree->GetWindowByClientId(client_window_id); 694 return tree->GetWindowByClientId(client_window_id);
695 } 695 }
696 696
697 } // namespace test 697 } // namespace test
698 } // namespace ws 698 } // namespace ws
699 } // namespace ui 699 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/server_window.cc ('k') | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698