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

Side by Side Diff: components/mus/ws/cursor_unittest.cc

Issue 2105483002: mus: Make sure only valid user-ids can be active. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | components/mus/ws/display_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 <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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 new WindowServer(&window_server_delegate_, 48 new WindowServer(&window_server_delegate_,
49 scoped_refptr<SurfacesState>(new SurfacesState))); 49 scoped_refptr<SurfacesState>(new SurfacesState)));
50 window_server_delegate_.set_window_server(window_server_.get()); 50 window_server_delegate_.set_window_server(window_server_.get());
51 51
52 window_server_delegate_.set_num_displays_to_create(1); 52 window_server_delegate_.set_num_displays_to_create(1);
53 53
54 // As a side effect, this allocates Displays. 54 // As a side effect, this allocates Displays.
55 WindowManagerWindowTreeFactorySetTestApi( 55 WindowManagerWindowTreeFactorySetTestApi(
56 window_server_->window_manager_window_tree_factory_set()) 56 window_server_->window_manager_window_tree_factory_set())
57 .Add(kTestId1); 57 .Add(kTestId1);
58 window_server_->user_id_tracker()->AddUserId(kTestId1);
58 window_server_->user_id_tracker()->SetActiveUserId(kTestId1); 59 window_server_->user_id_tracker()->SetActiveUserId(kTestId1);
59 } 60 }
60 61
61 ServerWindow* GetRoot() { 62 ServerWindow* GetRoot() {
62 DisplayManager* display_manager = window_server_->display_manager(); 63 DisplayManager* display_manager = window_server_->display_manager();
63 // ASSERT_EQ(1u, display_manager->displays().size()); 64 // ASSERT_EQ(1u, display_manager->displays().size());
64 Display* display = *display_manager->displays().begin(); 65 Display* display = *display_manager->displays().begin();
65 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root(); 66 return display->GetWindowManagerDisplayRootForUser(kTestId1)->root();
66 } 67 }
67 68
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 MoveCursorTo(gfx::Point(15, 15)); 189 MoveCursorTo(gfx::Point(15, 15));
189 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_)); 190 EXPECT_EQ(mojom::Cursor::EAST_RESIZE, mojom::Cursor(cursor_id_));
190 191
191 win->SetBounds(gfx::Rect(0, 0, 30, 30)); 192 win->SetBounds(gfx::Rect(0, 0, 30, 30));
192 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_)); 193 EXPECT_EQ(mojom::Cursor::IBEAM, mojom::Cursor(cursor_id_));
193 } 194 }
194 195
195 } // namespace test 196 } // namespace test
196 } // namespace ws 197 } // namespace ws
197 } // namespace mus 198 } // namespace mus
OLDNEW
« no previous file with comments | « no previous file | components/mus/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698